I need the regex to find function calls in strings in php, I have tried to search here on stackoverflow but none of the ones i've tried worked.
this pattern: ^.*([\w][\(].*[\)])
This will match: functionone(fgfg)
but also functionone(fgfg) dhgfghfgh functiontwo()
as one match. Not 2 separate matches (as in functionone(fgfg)
and functiontwo()
.
I don't know how to write it but I think this is what I need.
1. Any string, followed by (
2. Any string followed by )
And then it should stop, not continue. Any regex-gurus that can help me out?