Skip to content

add and modify the non-greedy#1

Open
CuiZewen wants to merge 3 commits into
namin:masterfrom
CuiZewen:master
Open

add and modify the non-greedy#1
CuiZewen wants to merge 3 commits into
namin:masterfrom
CuiZewen:master

Conversation

@CuiZewen

Copy link
Copy Markdown

In the past, there is only greedy quantifiers(.) , so i add the lazy quantifiers(.?)

The first tries first to repeat then backtracks to following pattern, the second tries first the following pattern then backtracks to repeat.

for example on the string "abab"
a.b will match "abab", a.?b will match only the starting "ab" :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant