sujeet kumar wrote:

> str = "<font color=#008000>www.<b>ruby</b>central.com/ -  4k - </font><nobr>a"
> temp.scan(/(#008000>)(^(</font>))*(</font>)/) {|w| print "#{w} \n" }

You can use the following regular expression (which isn”Ēt very flexible):

/#008000>(.*?)</font>/

That”Ēll slurp up anything from the end of the <font> to the beginning of
the </font>, so to speak.

> But this gives error
> Reg.rb:4: warning: Object#type is deprecated; use Object#class

That”Ēs a warning, and it”Ēs unrelated to your matching,
        nikolai

-- 
Nikolai Weibull: now available free of charge at http://bitwi.se/!
Born in Chicago, IL USA; currently residing in Gothenburg, Sweden.
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}