| Anchors | Meaning | Language |
|---|---|---|
| ^ | Fix regex match to the beginning of a line | |
| $ | Fix regex match to the ending of a line | |
| \A | Fix regex match to the beginning of a string | Ruby |
| \Z | Fix regex match to the ending of a string | Ruby |
| \z | Fix regex match up to, but not including, a newline at the end of a string (prefer \Z when possible) | Ruby |
| \b | Fix regex match to word boundaries | |
| \B | Fix regex match to non-word boundaries |
See also Regex Miscellaneous