README.md in regexp-examples-0.2.3 vs README.md in regexp-examples-0.2.4
- old
+ new
@@ -20,10 +20,12 @@
# 'foo-aa-bar', 'foo-bb-bar', 'foo-cc-bar', 'foo-dd-bar', 'foo-ee-bar', 'foo-aaa-bar', 'foo-bbb-bar',
# 'foo-ccc-bar', 'foo-ddd-bar', 'foo-eee-bar']
/https?:\/\/(www\.)?github\.com/.examples #=> ['http://github.com',
# 'http://www.github.com', 'https://github.com', 'https://www.github.com']
/(I(N(C(E(P(T(I(O(N)))))))))*/.examples #=> ["", "INCEPTION", "INCEPTIONINCEPTION"]
+/\x74\x68\x69\x73/.examples #=> ["this"]
+/\u6829/.examples #=> ["цай"]
/what about (backreferences\?) \1/.examples #=> ['what about backreferences? backreferences?']
```
## Supported syntax
@@ -34,21 +36,21 @@
* Non-capture groups, e.g. `/(?:foo)/`
* Capture groups, e.g. `/(group)/`
* Including named groups, e.g. `/(?<name>group)/`
* ...And backreferences(!!!), e.g. `/(this|that) \1/` `/(?<name>foo) \k<name>/`
* Groups work fine, even if nested! e.g. `/(even(this(works?))) \1 \2 \3/`
-* Control characters, e.g. `/\ca/`, `/\cZ/`, `/\c9/`
+* Control characters, e.g. `/\ca/`, `/\cZ/`, `/\C-9/`
+* Escape sequences, e.g. `/\x42/`, `/\x3D/`, `/\5word/`, `/#{"\x80".force_encoding("ASCII-8BIT")}/`
+* Unicode characters, e.g. `/\u0123/`, `/\uabcd/`
* **Arbitrarily complex combinations of all the above!**
## Not-Yet-Supported syntax
I plan to add the following features to the gem, but have not yet got round to it:
* Throw exceptions if illegal syntax (see below) is used. This is currently only partially implemented (for lookarounds only).
* POSIX bracket expressions, e.g. `/[[:alnum:]]/`, `/[[:space:]]/`
* Options, e.g. `/pattern/i`, `/foo.*bar/m`
-* Escape sequences, e.g. `/\xa1/`
-* Unicode characters, e.g. `/\u06E9/`
* Named properties, e.g. `/\p{L}/` ("Letter"), `/\p{Arabic}/` ("Arabic character"), `/\p{^Ll}/` ("Not a lowercase letter")
* Subexpression calls, e.g. `/(?<name> ... \g<name>* )/` (Note: These could get _really_ ugly to implement, and may even be impossible, so I highly doubt it's worth the effort!)
## Impossible features ("illegal syntax")