S
sujeet kumar
hi
I want to sepearte a pattern from a string using regular expression
and scan. String is
str =3D "<font color=3D#008000>www.<b>ruby</b>central.com/ - 4k - </font><=
nobr>a"
patttern is the part of string that is in between "#008000> " and "</font>"
for above str pattern is www.<b>ruby</b>central.com/ - 4k -=20
How to do this.
i tried like
str =3D "<font color=3D#008000>www.<b>ruby</b>central.com/ - 4k - </font><=
nobr>a"
temp.scan(/(#008000>)(^(</font>))*(</font>)/) {|w| print "#{w} \n" }
But this gives error
Reg.rb:4: warning: Object#type is deprecated; use Object#class
How to do this.
Thanks
Sujeet
I want to sepearte a pattern from a string using regular expression
and scan. String is
str =3D "<font color=3D#008000>www.<b>ruby</b>central.com/ - 4k - </font><=
nobr>a"
patttern is the part of string that is in between "#008000> " and "</font>"
for above str pattern is www.<b>ruby</b>central.com/ - 4k -=20
How to do this.
i tried like
str =3D "<font color=3D#008000>www.<b>ruby</b>central.com/ - 4k - </font><=
nobr>a"
temp.scan(/(#008000>)(^(</font>))*(</font>)/) {|w| print "#{w} \n" }
But this gives error
Reg.rb:4: warning: Object#type is deprecated; use Object#class
How to do this.
Thanks
Sujeet