There is such an array:

[''','"','.','!','@','#','№','$',';','%',':','^','&','?','*','(',')','-','_','+','=','{','}','[',']','\','|','/','`','~','<','>',' '] 

Is it possible to rework it into a regular season so that all characters fall under it anywhere on the line except letters and numbers?

    2 answers 2

    Need everything except bukaf and numbers?
    It's easier not to look for all NOT letters / numbers, but to exclude them.
    Something like this:

     $str =~ /[^a-z0-9]*/i; 

      Regular:

       /(\W|_)/g 

      Code example:

       var a = 'asdsda ;_-: dd'; console.log(a.match(/(\W|_)/g, ''));