lua-users home
lua-l archive

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


steve donovan <[email protected]> [12-07-07 19:04]:
> On Sat, Jul 7, 2012 at 6:51 PM,  <[email protected]> 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