12/17 |
Michael Robinson
|
Just some of the regex recommendations:
Always use /x -- ie, use whitespace.
Always use /m -- ie, ^ and $ mean start and end of line.
Always use /s -- ie, . matches newlines.
Multi line regexes should use m{}, not //.
Use \A and \z to indicate beginning and end of string.
Always match arbitrary whitespace if humans have been involved.