Regexp is the class for regular expression matching.
Regular expression literals are enclosed by slashes like:
/^this is regexp/
In other way, you can create the regular expression object using:
Compiles the string into a regular expression object. If
second argument given, and its value is true, then the created regexp
object becomes case-insensitive. the value of the second argument is Fixnum,
it must be bitwise-or of
Insert escape characters before regular expression special characters
string. Returns the newly created strings.
self =~ string
self === string
Returns an index of the matching place in the string, if matched.
nil if not matched. The index of the first
character is 0.
Matches with the value of the default variable (
self =~ $_
Returns true if the Regexp is compiled as case-insensitive.
Returns the orginal string form of the regular expression.