| -f (0|1) | search backward or forward (default 1) |
| -r (0|1) | pattern is a regular expression (default 0) |
| -i (0|1) | ignore case (default 0) |
| -m (0|1) | match words (default 0) |
| -l lim | limit on how far search goes |
| -all | return all matches |
| -wrap | wrap around |
| -n | failed search returns empty string rather than raising an error |
| -- | end of the options |
| -di (0|1) | diacritics insensitive (default 0) |
| -wi (0|1) | width insensitive (default 0) |
| -d (0|1) | allow dot to match any character, including line separators (default 0) |
| -ml (0|1) | allow ^ and $ to match the start and end of lines (default 1) |
| -u (0|1) | treat only \n as a line separator (default 0) |
| -uts (0|1) | use Unicode text segmentation to specify word boundaries (default 0) |
| -x (0|1) | allow spaces and #-prefixed comments in the pattern (default 0) |
\n is used.
The -i, -d, -ml, -x options can also be set
in the regular expression pattern itself using (?ismx-ismx) directives.
The -uts option enables Unicode text segmentation (word boundaries) as defined in the
Unicode Standard Annex UAX #29.