regex - Translate Go Regexp to Javascript -


how go regexp translate javascript?

"[\\w!#$%&'*+/=?^_`{|}~-]+(?:\\.[\\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\\w](?:[\\w-]*[\\w])?\\.)+[a-za-z0-9](?:[\\w-]*[\\w])?" 

  1. there has better way you're doing monstrosity of pattern.

  2. regular expressions tend pretty portable. should drop regex tester (google it) or script file , see if matches expect. if don't, rebuild regex in chunks , see piece causes fail.


Comments

Popular posts from this blog

java - HTTP Status 500 - An exception occurred processing JSP page /second.jsp at line 15 -

SQL Server - MyCTE query based on 24 hour period (next day) -

php - Using str_replace to translate a MySQL Table in html -