Schu wrote:
> hi people!
> 
> i can't info on that - is there anything comparable to the
> functionality of ereg() or preg_match() of PHP under ruby?
> 
> thx in advance
> S

Look at the methods String and Regexp provide.
Like String#match, Regexp#match, String#=~, Regexp#=~, String#scan, 
String#sub, String#gsub.
Also take a look at MatchData (returned by the #match methods).
For case insensitivity, use the i switch, example: /foo/i, or %r{foo}i 
(/regex/ is a regex literal which does the same as Regexp.new('regex'), 
%r{regex} is just a different way to write it).

Regards
Stefan
-- 
Posted via http://www.ruby-forum.com/.