C++11 regex cheatsheet


I thought about creating a cheatsheet for the C++11 regex library for a long time, and I finally sat down and made it over the last few days. In case you haven’t encountered them, regular expressions are a powerful way of searching and manipulating strings.

Because I wanted to limit the cheatsheet to one page, I couldn’t include all the information about the library. I had to omit some things like types in function signatures, but they should be easy to deduce. The cheatsheet only shows the ECMAScript variant of the syntax (which is the default). I think it has enough information to be a useful aide-mémoire.

Click on the image to download the PDF version:


Keen on mastering C++11/14? I’ve written a book about the C++11/14 features. You can get a VS2013, Clang or a GCC edition.


9 Responses to “C++11 regex cheatsheet”

  1. Thanks for the cheatsheet! !!

    Can you steer me to a tutorial using your work?

    (REGEX challenged)

    • lee
    • Reply
  2. Hi Lee. There are a couple of chapters on regexes in my book (cpprocks.com). They provide an overview of regex syntax and show the common uses for regexes.

  3. 518083 40611Yay google is my king helped me to locate this excellent internet web site ! . 937010


Leave a Comment