Posts Tagged As Regular Expressions


Sep 2014

30

Regular Expressions in Ruby

Regular Expression can be a simple pattern, such as the string must contain the sequence of letters "cat" or it can be complex. There are many ways of creating a regular expression pattern. By far the most common is to write it between forward slashes. If you want to match one of the special characters literally in a pattern, precede it with a backslash like so /\\*/.