Hi Kasi -

> -----Original Message-----
> From: kasi ramanathen [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 05, 2003 8:10 PM
> To: [EMAIL PROTECTED]
> Subject: again me "kasi":a though question of using variable in pattern
> 
> 
> 
> by using this code i get the right answer, but i want to store the 
> pattern in the variable and use it, for pattern, it fails. what is the 
> problem. is it related to priority of operator.
> 
> open(IH, "<st.htm");
> @a=(<IH>);
> $v=join(' ',@a);
> while($v=~m/href=\"(.*?)\"><IMG.*?border=0>/gi)
> {
> print "\n<br>$1";
> print 1;
> }
> 
> ***********************
> 
> i want to change line number 4 
> 
> while($v=~m/href=\"(.*?)\"><IMG.*?border=0>/gi)
> with,
> 
> $t="href=\"(.*?)\"><IMG.*?border=0>";
> 
> with
> 
> while($v=~m/$t/gi)
> 
> ****************************************
> some great brine at some corner of the world help me please. even 
> if i use $t="href=\"(.*?)\"><IMG";
> 
> it work but when my t value is
> 
> $t="href=\"(.*?)\"><IMG.*?border=0>";
> 
> it fails.
> 
> help me plese i'm in urgent need.
> 
> Catch all the cricket action. Download Yahoo! Score tracker

I don't see anything obvious (except your variable
$v has "\n"s in it and regexs normally stop at new lines -
use the s modifier - m/.../sgi to pass over new lines).

Can you post enough of your st.htm file so I can play
with your script here?

The other thing to keep in mind is the family CPAN modules
HTML::Parser, HTML::TokeParser, etc. that do all of your
parsing 'dirty work' for you.

Aloha => Beau.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to