You could try string.find(a, "(", true) to turn on plain text finding. Otherwise, you need to be aware of patterns and captures.
I did this interactively after I had the same behaviour
in my script.
Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio
> =string.find(a,"(" )
stdin:1: unfinished capture
[C]: in function 'find'
stdin:1: in main chunk
Why does string.find find the word "test" but not the "(" ?