Regular Expressions Notes

Regular Expression Notes


Last Updated: December 31, 2018 by Pepe Sandoval



Want to show support?

If you find the information in this page useful and want to show your support, you can make a donation

Use PayPal

This will help me to create more stuff and fix the existent content... or probably your money will be used to buy beer


RegEx cheat-sheet

  • ^ Matches the beginning of a line
  • $ Matches the end of the line
  • . Matches any character
  • \s Matches whitespace
  • \S Matches any non-whitespace character
    • Repeats a character zero or more times
  • *? Repeats a character zero or more times (non-greedy)
    • Repeats a character one or more times
  • +? Repeats a character one or more times (non-greedy)
  • [aeiou] Matches a single character in the listed set
  • [^XYZ] Matches a single character not in the listed set
  • [a-z0-9] The set of characters can include a range
  • ( Indicates where string extraction is to start
  • ) Indicates where string extraction is to end
  • \ make a special charactaer behave normally
  • | logical or this expresion or this expresion
Want to show support?

If you find the information in this page useful and want to show your support, you can make a donation

Use PayPal

This will help me to create more stuff and fix the existent content... or probably your money will be used to buy beer