^a-zA-Z0-9 excluding spaces?

前端 未结 4 1780
遇见更好的自我
遇见更好的自我 2021-02-08 04:50

I am trying to find everything in a paragraph that is not abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 and not space / /gi

/[^a-zA-Z0-9]|[^ ]/g         


        
4条回答
  •  你的背包
    2021-02-08 05:44

    try ^[\d\w]*$ or ^[\w]*$ as reg' Expression means from ^(start) to $(end) match 0-9a-zA-Z only

    for c++ ansistring="^[\\d\\w]*$";

提交回复
热议问题