I'm trying to catch some text between parathesis with a semicolon in the end.
Example: (in here there can be 'anything' !"#¤);); any character is possible);
I've tried this:
Text
= "(" text:(.*) ");" { return text.join(""); }
But it seems (.*) will include the last ); before ");" does and I get the error:
Expected ");" or any character but end of input found
The problem is that the text can contain ");" so I want the outer most ); to descide when the line ends.
This regex \((.*)\);
does what I want, but how can I do the same in PEG.js? I don't want to include the outer parentheses and semicolon in the result.
This seems like it should be quite easy if you know what you're doing =P