| Anchor | Description | Example | Valid match | Invalid |
|---|---|---|---|---|
| ^ | start of string or line | ^foam | foam is fun | bath foam |
| $ | end of string or line | ish$ | finish | finishing |
| \b | word boundary; position between a word character (\w), and a nonword character (\W) | \bis\b | This island is beautiful | This island isn't beautiful |
| \B | not-word-boundary. | \Bland | island | peninsula |
|Char class|Description|Example|Valid match|Invalid|