user34537
user34537

Reputation:

In regex is it called lazy or non-greedy?

I originally heard it as nongreedy. Then on references 'on the web' i saw it called as lazy. Which is it?

Upvotes: 1

Views: 283

Answers (1)

kennytm
kennytm

Reputation: 523614

Non-greedy, ungreedy, reluctant, minimal match, lazy etc. all refer to the same concept. Which name to use is just a matter of taste.

Upvotes: 8

Related Questions