Created
March 14, 2017 18:52
-
-
Save DmitrySoshnikov/2d56977cbdf38901fc09c35e0b8bf814 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// RegExp: | |
/x*?/ | |
// 1. Char is main, repetition is secondary (modifier) | |
{ | |
type: 'Char', | |
value: 'x', | |
modifier: { | |
value: '*', | |
nonGreedy: true | |
} | |
} | |
// 2. Repetition is main, char is secondary (expression) | |
{ | |
type: 'Repetition', | |
modifier: '*', | |
nonGreedy: true, | |
expression: { | |
type: 'Char', | |
value: 'x' | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment