How to translate ruby regex to javascript?

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


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

This site uses Akismet to reduce spam. Learn how your comment data is processed.