regex - JavaScript Regular Expression Syntax -
I'm trying to create a regular expression that checks the letters, numbers, and underscores in .NET, ^ \ W + $ "I can. However, I'm not familiar with javascript syntax. Can somebody help me out?
Thank you!
One obvious difference is that in javascript, you can regex the form of the For example, a Returns: / pattern / flags - This is Perl-style, your "example" will then be
^ \ w + $ →
/ ^ \ w + $ / .
e with multiple
e , case-insensitive search (hence
i flag): < / P>
var s = 'qweeeerty'; S = s.replace (/E + / I, 'E');
qwerty .
Comments
Post a Comment