[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Patterns that cope with beginnings and end of strings
- From: Geoff Leyland <geoff_leyland@...>
- Date: Fri, 2 Aug 2013 13:00:35 +1200
On 2/08/2013, at 12:50 PM, Paul K <paulclinger@yahoo.com> wrote:
>> I must be missing something obvious. Any pointers?
>>> =("all all ball all"):gsub("%f[%S]all%f[%s%z]", "none")
>> all none ball none 2
>
> Something like this?
>
>> ("all all ball all"):gsub("%f[%w]all%f[%W]", "none")
> "none none ball none" 3
Well, that is obvious now you point it out. Thanks!