in reply to Re^4: Non-greedy substitution
in thread Non-greedy substitution
I know. But you said you thought «,.+?$» searches for "the shortest possible match within the string that starts with a comma". Since neither «,» nor «$» searches for the shortest possible anything (starting with a comma or otherwise), that means you though «.+?» did that. «.+?» doesn't search for commas, which it would need to do to find "the shortest possible match within the string that starts with a comma".
|
---|