[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: string.find does act differently based on input?
- From: liam mail <liam.list@...>
- Date: Sat, 7 Jul 2012 18:30:58 +0100
On 7 July 2012 18:14, <firstname.lastname@example.org> wrote:
> steve donovan <email@example.com> [12-07-07 19:04]:
>> On Sat, Jul 7, 2012 at 6:51 PM, <firstname.lastname@example.org> wrote:
>> > Why does string.find find the word "test" but not the "(" ?
>> Because '(' is a 'magic character' in string patterns. If you say
>> string.find(s,'(',1,true) then it does a plain search.
>> steve d.
> Thanks to all for the answers! :) This list is as fast and
> user friendly as Lua itsself :))))
> If "(" is magic...
> Is it possible to find the string, which is enclosed in "()"...for
> =string.find(a, <insert magic here> )
> 13 33
> Best regards,
Yes the magic is "%b() to find the start and end which are balanced.