hi
I want to sepearte a pattern from a string using regular expression
and scan. String is
str = "<font color=#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 -
How to do this.
i tried like
str = "<font color=#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