Regex Guru

Friday, 28 September 2012

Regular Expressions Cookbook Code Samples

Filed under: Regex Cookbook — Jan Goyvaerts @ 15:15

One of the common criticisms against the first edition was that we
didn’t have the regular expressions and code samples available for download. Since our book only has very short code snippets rather than complete programs, we (the authors) did not have these available as separate files either.

But for the second edition we’re trying to do better. You can now download the code samples from the 2nd edition of Regular Expressions Cookbook. This HTML file contains all the blocks with regular expressions and source code from the book, along with the titles of the chapters, recipes, and sections that they are found in. If you have purchased the book, you can use this file to easily copy and paste the regular expressions and source code snippets.

Even if you purchased the ebook, you may prefer to use this file. The regexes in the ebook are formatted with line breaks and gray dots for spaces to make them easier to read in print. The HTML file does not use such formatting, so you can copy and paste them directly. This means that some very regexes will run beyond the edge of your browser window.

1 Comment

  1. I’m not sure I’ll buy your second edition as I had already bought the first one, but like many people I missed an easy way to copy and paste regexes. So, thanks a lot for this webpage!
    Your book and your website: helped me a lot to learn regular expressions. Now I’m using them everywhere :)

    Comment by Olivier — Tuesday, 23 October 2012 @ 5:17

Sorry, the comment form is closed at this time.