Ruby regular expressionsEdit
^matches beginning of line$matches end of line\Amatches beginning of string\zmatches end of string\Zmatches end of string, unless string ends with\n, in which case it matches just before the\n
Note: I've never needed to use \Z in a regular expression