CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
This one is easy for you :))

 



pbuks
Deleted

Jan 22, 2001, 2:39 PM

Post #1 of 4 (377 views)
This one is easy for you :)) Can't Post

How can I filter the name "(l&f)(b)lade" out of this string :: <font size="1"><img src="/default/images/default.theme/bolletje.gif" width="7" height="7" alt="" border="0"> <font size="1">(l&f)(b)lade<\n></font>

And not only for that name but for any name what is possible that stands between <font size="1"> XXXXX<\n>



Thank you very much
PBuks

ps \n=br



sleuth
Enthusiast

Jan 22, 2001, 6:55 PM

Post #2 of 4 (373 views)
Re: This one is easy for you :)) [In reply to] Can't Post

 
$string = qq~<font blabla>(blabla)This is a name</font>~;

$string =~ s~<font blabla>.*</font>~<font blabla>Someting else</font>~;

.* will grab anything between the tags and translate that line into the line on the right side of the ~

Tony



pbuks
Deleted

Jan 23, 2001, 7:56 AM

Post #3 of 4 (357 views)
Re: This one is easy for you :)) [In reply to] Can't Post

Thank you very much sleuth

Was an easy beginner question uh !?

Cya PbukS




modified
Deleted

Jan 23, 2001, 3:04 PM

Post #4 of 4 (348 views)
Re: This one is easy for you :)) [In reply to] Can't Post

This might work a bit better for you:

$string =~ /<font size\=\"1\">(\w+)<\/font>/;
$found = $1;


 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives