Is there any helper function in (ASP).NET library that properly escapes .NET regex patterns to be used in javascript? So that i don't need manually escape + quantifiers, etc. As far as i understand RegularExpressionAttribute from Data Annotations performs proper translation. Can i reuse it somehow?
-
1I've not used it but msdn.microsoft.com/en-us/library/… may help. Looks like it should take any string from .NET and make it into a valid string in javascript (by escaping stuff, etc.).Chris– Chris2012-02-06 15:14:45 +00:00Commented Feb 6, 2012 at 15:14
Add a comment
|