About 242,000 results
Open links in new tab
  1. Regex to match string containing two words in any order

    Dec 16, 2019 · Regex to match string containing two words in any order JackEdwardLyons December 16, 2019, 10:05pm 1

  2. Explain the uses of caret (^) in regex - The freeCodeCamp Forum

    Aug 28, 2018 · For example: /^([aeiouy])(.)/ indicates a string starting with a single vowel (the first capture group is a single vowel), followed by any single character (the second capture group is …

  3. Difference between /\w/ and /\w+/ ( Regex )? - JavaScript - The ...

    Feb 11, 2020 · Tell us what’s happening: Can someone tell me the difference between /\w/ and /\w+/ ? the “+” operator in regex is used for identifying repeating characters I am confused by …

  4. Regular Expressions: Reuse Patterns Using Capture Groups

    Jul 31, 2018 · regex.test(str) checks whether str contains at least one substring that matches regex. It’s nothing to do with being greedy. For example: + is greedy by default, but adding ? …

  5. Replacing space and comma from a string using regex

    Oct 17, 2020 · Your regex doesn’t work because first, you’ve put the regex into quotes, so you’re checking if your string contains this substring: '/^[\s,]$/g'. It’s not evaluated as a regex …

  6. Can Anyone Explain. What is the "$1 $2" in first replace statement …

    Feb 22, 2020 · It’s the first and the second capturing groups. In regex, you can put a pattern in brackets (()). The brackets specify a capturing group: whatever matches in that group is …

  7. Matching a list of regex to every string in a list one by one

    Nov 2, 2022 · I have a list of strings and a list of regex patterns. What I want to achieve is that for every string in the list, I want to try matching the patterns found in the regex list that I have …

  8. Replacement strings with dollar signs - The freeCodeCamp Forum

    May 8, 2020 · The dollar sign $ in regex means the end or the beginning of a string. So it means to stop when the $ is in the end or to start from a particular letter if the $ is on the front.

  9. What does this do in regex (?= ) - The freeCodeCamp Forum

    Jan 18, 2019 · Here you can see 2 regex expressions, each is in its own () section. But since first one, bomb, have “?” lookahead symbol, it means it will just say “yeah, my check is passing, go …

  10. Extract Matches VS Test - JavaScript - The freeCodeCamp Forum

    Jul 9, 2019 · Tell us what’s happening: I’m curious why when you use test() method, you use the the method as regex.test(str) let regex = /Code/; let result = regex.test(str); When you use …