lundi 14 novembre 2016

Regex Pattern too long -- need split in JavaScript without escape characters

I'm dealing w/ a really long regex pattern to match on and it's so long i'm going to have to split it up into several different strings. My question is: how can i avoid the escape characters in JavaScript to instantiate a new RegExp to create a testable pattern? In C# it's pretty simple: just suffice the string w/ the @ symbol and the compiler takes care of it. JavaScript is totally different and i'm not certain what the equivalent statement is.

Aucun commentaire:

Enregistrer un commentaire