Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jun 11th, 2008, 2:58 AM   #1
abhisheksainiabhishek
Newbie
 
Join Date: Jun 2008
Posts: 12
Rep Power: 0 abhisheksainiabhishek is on a distinguished road
Wink comptatible attributes

If I have want to combine tags with compatible attributes like...

<font color="blue" font="Times"><font size="14"abcdegh</font></font>

to

<font color="blue" font="Times" size="14"abcdegh</font>

as I have have it all in one scalar variable

I thoughtI would have something like..

my $startFontTag="<font";
my $endFontTag="</font>";

$string =~ s/$startFontTag[\w*|\s*|\S*]$startFontTag[\w*|\s*|\S*]/$1/gi;

but I dont think the above approach is going to work.

Should I do something like first check the string to see if any occurence of
</font></font> occurse then delete one of them and move back to check staring font tasg
and to combine them.

Thanks!
abhisheksainiabhishek is offline   Reply With Quote
Old Jun 11th, 2008, 4:53 PM   #2
abhisheksainiabhishek
Newbie
 
Join Date: Jun 2008
Posts: 12
Rep Power: 0 abhisheksainiabhishek is on a distinguished road
Re: comptatible attributes

i got it working.
will post the solution sometime.

this thread can be closed
abhisheksainiabhishek is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dataset.ReadXML: elements with attributes kruptof C# 0 Aug 13th, 2007 7:01 AM
help with node design rwm C++ 2 Jun 13th, 2007 2:36 AM
Directory attributes in C. Kennedy C 1 Aug 30th, 2006 1:13 PM
Command to find file attributes Creator Bash / Shell Scripting 6 Jun 6th, 2006 7:08 PM
function to get file attributes Creator C 2 Jun 2nd, 2006 9:13 AM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 6:43 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC