Does \w also match numbers?

后端 未结 3 1558
失恋的感觉
失恋的感觉 2021-01-29 07:33

I would expect that this

var r = new RegExp(\'\\\\s\\\\@[0-9a-z]+\\\\s\', \'gi\');

applied to this string

1 @bar @foo2 * 112
         


        
3条回答
  •  Happy的楠姐
    2021-01-29 08:09

    "\w" Matches any word character (alphanumeric & underscore). Only matches low-ascii characters (no accented or non-roman characters). Equivalent to [A-Za-z0-9_] Best source to learn : www.regexr.com

提交回复
热议问题