About 400,000 results
Open links in new tab
  1. Check whether a string matches a regex in JS - Stack Overflow

    I want to use JavaScript (I can also use jQuery) to do check whether a string matches the regex ^([a-z0-9]{5,})$, and get a true or false result. match() seems to check whether part of a string …

  2. javascript - regex.test V.S. string.match to know if a string matches …

    Many times I'm using the string match function to know if a string matches a regular expression.

  3. regex - Matching exact string with JavaScript - Stack Overflow

    This is nonsense, it has nothing to do with RegExp. How does this address the question if you e.g. want to test if str1 exactly matches /[a-z]{3}/?

  4. JavaScript: test vs exec - Stack Overflow

    24 If you only need to test an input string to match a regular expression, RegExp.test is most appropriate. It will give you a boolean return value which makes it ideal for conditions. …

  5. How can I validate an email address in JavaScript?

    Sep 5, 2008 · Keep in mind that one should not rely on JavaScript validation alone, as JavaScript can be easily disabled by the client. Furthermore, it is important to validate on the server side. …

  6. javascript - How to test valid UUID/GUID? - Stack Overflow

    How to check if variable contains valid UUID/GUID identifier? I'm currently interested only in validating types 1 and 4, but it should not be a limitation to your answers.

  7. regex - test string against multiple regexes in javascript - Stack …

    I want to test a given string against 20 or so regular expressions. What's a clean way to do this in Javascript? I'm more concerned about clean code and readability than efficiency (but I don't …

  8. javascript - Regex to check whether string starts with, ignoring …

    Dec 22, 2015 · I need to check whether a word starts with a particular substring ignoring the case differences. I have been doing this check using the following regex search pattern but that …

  9. javascript - JS - String includes a substring that matches regex ...

    Aug 26, 2019 · Check if a JavaScript string includes a substring that matches a regex. I have tried string.includes (substring) var myString = "This is my test string: AA.12.B.12 with some other …

  10. javascript - How to check if the input string is a valid Regular ...

    Jun 22, 2013 · And, to be honest, what OP wanted was just to "check if the input string is a valid regex or not"; there were no constraints on the input length specifically, so any string could be …