I have been having trouble trying to translate python regular expression to a JavaScript regular expression here is the python code r/^([ab].*1$ | ^[ab]$/ and this was my JavaScript translation /([^ab]*.1$) | [^ab]$/gm I have to make it match 'a', 'aa', 'bababbb' and it is not supposed to match 'ab', 'baba'. Thank you so much for your help!