^ and \A are usually the same; it's only with the //m modifier that they differ (since then ^ will match at the beginning of the string or after a newline, \A can still be used to match only the beginning of the string).
$ and \Z are usually the same (matching at the end of the string or just before a newline at the end of the string) but, again, differ with //m (where $ will match at the end of the string or before any newline). \z differs from either in that it matches only the end of the string, with or without //m.
In reply to Re: misc. regex questions
by ysth
in thread misc. regex questions
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |