View Single Post
Old 02-06-2018, 03:19 PM   #13
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,695
Karma: 205039118
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I get the same (and expected) results as KevinH and Doitsu on Windows 10.

@Wasserpulle: I'm guessing if Kevin's second test is only matching "33" for you, that you have the Minimal Match option checked. That overrides PCRE's default greediness behavior (including the greediness of repetition). If you uncheck it, you should get the same results as us.

That could also easily explain the results you describe in the very first post.

With the cursor in front of a string of alpha characters, [a-zA-Z]* isn't going to match anything when Minimum Match is checked. Because the minimum match of an expression that's allowed to return nothing will always be nothing.

{1,} should only match the first occurrence if Minimal Match is checked.

Same with {2,4}. With Minimal Match checked, it will never match anything other than the first two occurrences of the criteria.

3{2,4} with Minimum Match checked is essentially the same as searching for "33" -- which is why that's what it matches for you.

Last edited by DiapDealer; 02-06-2018 at 06:30 PM.
DiapDealer is online now   Reply With Quote