Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save abhinavkorpal/43001fc48673fd8a73ee06f0d54e69b6 to your computer and use it in GitHub Desktop.
Save abhinavkorpal/43001fc48673fd8a73ee06f0d54e69b6 to your computer and use it in GitHub Desktop.
Backslash Character and Special Expressions
‘\b’ Match the empty string at the edge of a word.
‘\B’ Match the empty string provided it’s not at the edge of a word.
‘\<’ Match the empty string at the beginning of word.
‘\>’ Match the empty string at the end of word.
‘\w’ Match word constituent, it is a synonym for ‘[_[:alnum:]]’.
‘\W’ Match non-word constituent, it is a synonym for ‘[^_[:alnum:]]’.
‘\s’ Match whitespace, it is a synonym for ‘[[:space:]]’.
‘\S’ Match non-whitespace, it is a synonym for ‘[^[:space:]]’.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment