I prefer a correct solution that contains some repetition to an incorrect solution any time. There are ways to make .*? work correctly, but ...I agree that an incorrect solution doesn't make sense, but is it incorrect? .*?Zwould match the shortest possible sequence of characters up to, but not including, the letter Z. Could you give an example where this would fail?
In reply to Re^6: This regexp made simpler
by rovf
in thread This regexp made simpler
by rovf
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |