I\'m working on a gettext javascript parser and I\'m stuck on the parsing regex.
I need to catch every argument passed to a specific method call _n( and
_n(
We can do this in two steps:
1)catch all function arguments for _n( or _( method calls
(?:_\(|_n\()(?:[^()]*\([^()]*\))*[^()]*\)
See demo.
http://regex101.com/r/oE6jJ1/13
2)catch the stringy ones only
"([^"]*)"|(?:\(|,)\s*([^"),]*)(?=,|\))
http://regex101.com/r/oE6jJ1/14