Javascript Regex to PEG converter