4 ms·
In the order of searching and hence the match you can get, yes. In performance in the case of a non-match, no.
by ghusbands 10y ago
In the order of searching and hence the match you can get, yes. In performance in the case of a non-match, no.
- cyphar 10y agoThe regex a?a?a?a?a?aaaaa against the string aaaaa will complete in linear time if you use non-greedy ?s but with greedy matching it has exponential complexity. So, there is a difference.