About 50 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 matches a …

  2. javascript - What is the need for caret (^) and dollar symbol ($) in ...

    Javascript RegExp () allows you to specify a multi-line mode (m) which changes the behavior of ^ and $. ^ represents the start of the current line in multi-line mode, otherwise the start of the string $ …

  3. regex - JavaScript regular expressions and sub-matches - Stack Overflow

    JavaScript regular expressions and sub-matches Asked 16 years, 9 months ago Modified 8 months ago Viewed 36k times

  4. regex - How do you access the matched groups in a JavaScript regular ...

    The m0 argument represents the full matched substring {0}, {1}, etc. m1 represents the first matching group, i.e. the part enclosed in brackets in the regex which is 0 for the first match.

  5. javascript - meaning of dollar symbol in regular expression - Stack ...

    Sep 13, 2015 · It doesn't mean anything special. But because $ is allowed in identifier names, many Javascript libraries have taken to using $ as the "central" interface to them, or at least as a shortcut …

  6. regex - Validate phone number with JavaScript - Stack Overflow

    As a rule of thumb — trying to validate phone numbers is doomed to failure. What with different structures in different countries and extensions, its a very difficult problem.

  7. Javascript split regex question - Stack Overflow

    hello I am trying what I thought would be a rather easy regex in Javascript but is giving me lots of trouble. I want the ability to split a date via javascript splitting either by a '-','.','/' an...

  8. JavaScript replace/regex - Stack Overflow

    Jul 22, 2009 · It's not accurate to say that the regular expression literal (/regex/) is the same as RegExp ("regex"). In the regular expression literal, the reverse-solidus ('\') need not itself be escaped ('\\') in …

  9. Return positions of a regex match () in Javascript?

    Is there a way to retrieve the (starting) character positions inside a string of the results of a regex match() in Javascript?

  10. regex - Regular expression to get a string between two strings in ...

    Regular expression to get a string between two strings in JavaScript The most complete solution that will work in the vast majority of cases is using a capturing group with a lazy dot matching pattern.