/<div>.+</div>/
This will not match <div>text</div>
because .+
consumes </div>
characters. .+
uses greedy evaluation.
/<div>.+?</div>
This will match <div>text</div>
because .+?
uses lazy evaluation and returns control to next expression as it finds first match.
Created
June 1, 2018 15:55
-
-
Save mort3za/b2765342677e63ba7f4c3462477e5c6d to your computer and use it in GitHub Desktop.
Brief notes of regex (regular expression)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment