I need to parse out some strings from two types of files
File type one lines with subpattern
l('some string')
l('some other string', $mod = "anything")
File type two lines with subpattern
{l s='some string' mod='anything'}
{l s='some other string' mod='anything'}
From both of these file types I want to parse out "some string", "some other string", ....
Now what would be better for performance:
a) using preg_match_all - I am quite struggeling with this one because subpatterns can also contain anything that wraps them...
b) using custom file reading/parsing (char by char, storing previous char and state, ...)
??
Thanks in advance.