Regex not to escape only =?

3

I currently have the following regex:

"/([^\w\.\,]+\s*)/"

It escapes, letters, numbers, commas and points followed or not of space. How do I let it escape all except the characters: < > = !

    
asked by anonymous 27.12.2015 / 16:30

1 answer

5

Try this, it will only accept the characters < > ! = :

/[<>=!]/g

Example: link

This will cause it to accept everything except the characters < > ! = :

/[^<>=!]/g

Example: link

    
27.12.2015 / 16:35