[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: string.find does act differently based on input?
- From: meino.cramer@...
- Date: Sat, 7 Jul 2012 19:14:32 +0200
steve donovan <steve.j.donovan@gmail.com> [12-07-07 19:04]:
> On Sat, Jul 7, 2012 at 6:51 PM, <meino.cramer@gmx.de> 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
example
a="indentifier(StringOfUnknownLength)"
=string.find(a, <insert magic here> )
13 33
???
Best regards,
mcc