There are a couple ways to do this; Blockzez’s works pretty well, although you can also use str:find('[', 1, true).
string.find(str, pattern, start, plain) is how string.find is defined, so if you set the plain flag to true it will instead find the literal pattern you gave it instead of using it as a Lua pattern. This method also tends to be faster (although not noticeable unless you abuse find).