01-14-2010, 08:15 PM
You can use them like this...
Code:
X = regex.new(/abc/)
Y = "xxxxabcxxx"
puts X =~ Y #4
If("abcd" =~ X) then
puts "true" # Returns true
end