I have following regular Expression: /prefix(([^)]+))/g
This expression matches everything between 'prefix(' and ')'.
For example:
value = 'prefix(foo) bar(foo)';
return value.match( /prefix\(([^)]+)\)/g )
result: 'prefix(foo)'
What I am trying to achieve is this:
value = 'prefix() bar(foo)';
return value.match( correctRegularExpression )
result: 'prefix()'
I am searching for correctRegularExpression and I am really stuck here since I am new to regular Expressions.