Verified Commit e21c9f3e authored by Camil Staps's avatar Camil Staps 🚀

\e escape to \x07 like \a, as in pcre

parent 36ebe651
......@@ -28,7 +28,7 @@ The following regex features are supported:
character ranges and shorthand character classes
* Anchors: `^`, `$`, `\b`, `\B`
* Shorthand character classes: `.`, `\d`, `\D`, `\w`, `\W`, `\s`, `\S`
* Escape sequences: `\a`, `\f`, `\n`, `\r`, `\t`, `\v`, `\\`, `\nnn`
* Escape sequences: `\a`, `\e`, `\f`, `\n`, `\r`, `\t`, `\v`, `\\`, `\nnn`
(octal), `\xhh` (hexadecimal)
## Example (`example.icl`)
......@@ -108,7 +108,7 @@ The following BNF grammar is recognised by `compile`:
<Special> ::= '\' | '+' | '*' | '?' | '^' | '$' | '.' | '|'
| '(' | ')' | '[' | ']' | '{' | '}'
<EscapeChar> ::= 'a' | 'f' | 'n' | 'r' | 't' | 'v' | '\'
<EscapeChar> ::= 'a' | 'e' | 'f' | 'n' | 'r' | 't' | 'v' | '\'
```
## Todo (in order of importance)
......
......@@ -2,6 +2,7 @@ definition module Regex.Util
escape_sequences :==
[ ('a', '\x07')
, ('e', '\x07')
, ('f', '\x0c')
, ('n', '\x0a')
, ('r', '\x0d')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment