The problem is that arg can never contain a newline, yet you use a mask that does contain a newline... should be quite obvious the mask will never match..
And as for lsearch:ing arg, you're just getting away with with sheer luck.. should arg contain characters such as {[]} and similar, you'd be up for a "nice" surprise...
Use proper lists and do a foreach loop to use each list item as a pattern with "string match", don't expect "string match" to pick a part of the pattern and match it against the text-string.
That is, given that "patterns" holds a valid list structure and "text" the text string, something like this: