osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Can one make 'in' ungreedy?


Chris Green wrote at 2020-5-18 11:50 +0100:
> ...
>So in the particular case where I have a problem sbstrip is "[Ipswich
>Recycle]" and the Subject: is "[SPAM] [Ipswich Recycle] OFFER:
>Lawnmower (IP11)".  The match isn't found, presumably because 'in' is
>greedy and sees "[SPAM] [Ipswich Recycle]" which isn't a match for
>"[Ipswich Recycle]".

`in` directly matches substrings; it is not greedy.