Skip to content

Instantly share code, notes, and snippets.

@pallavJha
Last active October 26, 2023 11:12
Show Gist options
  • Save pallavJha/355133f0a99df94d9aaa58a5fbbc4abd to your computer and use it in GitHub Desktop.
Save pallavJha/355133f0a99df94d9aaa58a5fbbc4abd to your computer and use it in GitHub Desktop.
regex test
\b: Thsis matches a word boundary, ensuring that we only match complete words and not parts of larger words.
(?:ga|pit): This matches either "" or "". The | character represents "or" and the "?:"syntax creates a non-capturing group.
\b: This matches another word boundary, ensuring that we only match complete words.
/g: This is the global flag/pattern, so we match every occurrence of the pattern in the string, not just the first one.
/i: Case-insensitive flag/pattern to locate both lower-case and upper-case letters ("", "", "", "", "", "", "", etc.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment