How to translate ruby regex to javascript?

In ruby, I have a regex to get a string formatted “@xxx”:

(/(?<!S)@[A-Za-z0-9-]+/)

I also need this regex in client side. But javascript cant read this.How can I change this regex in javascript?


Source: regex

Leave a Reply