regexp-diagram
π https://takayoshiotake.github.io/regexp-diagram/ draws regular expression patterns like railroad-diagram. Regular expression syntax follows the MDN Web docs. And, from v1.1.0, named capture groups and lookbehind are supported.
Examples
Number
-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?
Greedy and Non-Greedy Matching
(greedy)+(non-greedy)+?
Lookahead and Lookbehind
x(?=y)|x(?!y)|(?<=y)x|(?<!y)x
Issues
- Unicode property escapes not supported