what is opposite to javascript match() -


If I want to match something with javascript, then I can use foo.match (); But how can I check that it does not match ...

To be more clear, I use it ! and .test () , example:

  varHenom =! / Measure x /.test (string);  

Since SPEC does not return returns in a match, it also works:

  var hasNoMatch =! Foo.match (); From a very fast resource:  

If regular expressions contain the G flag, then the method returns all the matches. There were no matches, method returns null .


Comments