README.md in regexp-examples-0.5.4 vs README.md in regexp-examples-0.6.0
- old
+ new
@@ -41,10 +41,11 @@
* Comment groups, e.g. `/foo(?#comment)bar/`
* Control characters, e.g. `/\ca/`, `/\cZ/`, `/\C-9/`
* Escape sequences, e.g. `/\x42/`, `/\x5word/`, `/#{"\x80".force_encoding("ASCII-8BIT")}/`
* Unicode characters, e.g. `/\u0123/`, `/\uabcd/`, `/\u{789}/`
* Octal characters, e.g. `/\10/`, `/\177/`
+* POSIX bracket expressions (including negation), e.g. `/[[:alnum:]]/`, `/[[:^space:]]/`
* **Arbitrarily complex combinations of all the above!**
* Regexp options can also be used:
* Case insensitive examples: `/cool/i.examples #=> ["cool", "cooL", "coOl", "coOL", ...]`
* Multiline examples: `/./m.examples #=> ["\n", "a", "b", "c", "d"]`
@@ -52,17 +53,16 @@
* Options toggling supported: `/before(?imx-imx)after/`, `/before(?imx-imx:subexpr)after/`
## Bugs and Not-Yet-Supported syntax
* Nested character classes, and the use of set intersection ([See here](http://www.ruby-doc.org/core-2.2.0/Regexp.html#class-Regexp-label-Character+Classes) for the official documentation on this.) For example:
- * `/[[abc]]/.examples` (which _should_ return `["a", "b", "c"]`)
+ * `/[[abc]de]/.examples` (which _should_ return `["a", "b", "c", "d", "e"]`)
* `/[[a-d]&&[c-f]]/.examples` (which _should_ return: `["c", "d"]`)
* Conditional capture groups, such as `/(group1) (?(1)yes|no)`
Using any of the following will raise a RegexpExamples::UnsupportedSyntax exception (until such time as they are implemented!):
-* POSIX bracket expressions, e.g. `/[[:alnum:]]/`, `/[[:space:]]/`
* 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!)
There are loads more (increasingly obscure) unsupported bits of syntax, which I cannot be bothered to write out here. Full documentation on all the various other obscurities in the ruby (version 2.x) regexp parser can be found [here](https://raw.githubusercontent.com/k-takata/Onigmo/master/doc/RE).