The full syntax of the regular expressions is given in the following table.
| character | what it matches with |
| . | any character |
| first position in line | |
| $ | last position in line |
| [xyz] | one of the given characters |
| don't interprete `char' | |
| <esc>`char' | don't interprete `char' |
| linefeed | |
| <ret> | linefeed |
| "string" | match the string as one object |
| # | any digit |
| & | any alphabetic character |
| any alphanumeric character | |
| ! | any word character |
| ! |
any character not in words |
| / | end of search string |
| ( ) | consider contents as one object |
| a* | take object a zero or more times |
| a |
take object a one or more times |
| a? | take object a zero or one times |
| a{m,n} | take a at least m, at most n times |
| a |
either a or b |
| a%b | a if followed by b |
| a@`digit' | put a in variable number `digit' |