Home  >  Q&A  >  body text

javascript - js regular expression English numbers and all punctuation characters

js regular expression English numbers and all punctuation characters Do you have a copy?

習慣沉默習慣沉默2680 days ago880

reply all(3)I'll reply

  • 淡淡烟草味

    淡淡烟草味2017-05-19 10:40:13

    For English characters + punctuation + numbers...
    It seems to be ascii code...
    Try this
    /[x00-xff]+/g.test('askdfjl123.ksdf.ms.df()*!) (@#&(&(!%!"}|{P}|')


    Damn my legs, the editor swallowed me up

    reply
    0
  • 仅有的幸福

    仅有的幸福2017-05-19 10:40:13

    \d 匹配一个数字字符。等价于[0-9]。grep 要加上-P,perl正则支持
    \w 匹配包括下划线的任何单词字符。类似但不等价于“[A-Za-z0-9_]”,这里的"单词"字符使用Unicode字符集。
    \s 匹配任何不可见字符,包括空格、制表符、换页符等等。等价于[ \f\n\r\t\v]。
    
    这些满意吗?不满意的话,可以使用[0-9a-zA-Z_,\.]这样写不就可以了?想加什么加什么?
    /[,\.]/.test("www,")

    reply
    0
  • 给我你的怀抱

    给我你的怀抱2017-05-19 10:40:13

    /[x00-xff]+/g.test('aaa')

    reply
    0
  • Cancelreply