About 239,000 results
Open links in new tab
  1. Pattern matching in JavaScript? - Stack Overflow

    May 26, 2020 · Pattern matching is generally referring to matching arguments passed to a function: testing to see if they match a specific "pattern". For example, a pattern match might …

  2. Switch statement for string matching in JavaScript

    May 24, 2010 · Switch statement for string matching in JavaScript Asked 15 years, 6 months ago Modified 2 years, 7 months ago Viewed 371k times

  3. javascript - ES6 pattern match in Switch - Stack Overflow

    Mar 28, 2017 · Now actual pattern matching would allow us to destructure and match in the same expression – due to limitations of JavaScript, we have to match in one expression and …

  4. 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 …

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

    Matching exact string with JavaScript Asked 16 years, 11 months ago Modified 3 years, 6 months ago Viewed 179k times

  6. regex - Pattern validation with JavaScript - Stack Overflow

    May 30, 2017 · I want a pattern with letters and numbers only. This is how I do it... JavaScript file: var pattern_checked = checkPattern(); function checkPattern(){ var elem = …

  7. How to do a wildcard element name match with "querySelector()" …

    Is there a way to do a wildcard element name match using querySelector or querySelectorAll? The XML document I'm trying to parse is basically a flat list of properties I need to find …

  8. regex - How do you access the matched groups in a JavaScript …

    Match indicates the result of running your RegEx pattern against your string like so: someString.match(regexPattern). Matched patterns indicate all matched portions of the input …

  9. javascript - What is a good regular expression to match a URL?

    Sep 28, 2010 · John Gruber's Liberal, Accurate Regex Pattern for Matching URLs is also good. See this SO question for how to modify it to work in Javascript.

  10. javascript - use the filter and match methods on an array to find …

    Nov 5, 2017 · There's a few misunderstandings you have: Regular expressions is used for matching strings that match a certain pattern. It's a powerful thing but I'd say it's not the best …