Errata

Mastering Regular Expressions

Errata for Mastering Regular Expressions

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
Printed Page 10
1st paragraph

The paragraph ending with "by the end of the line." contains two instead of one white spaces before the word "line".

Roman Seidelsohn  Oct 25, 2020 
Printed Page 130
Regex second last comment #

Note the locationn should be 'Note the location' without the second n

Anonymous  Jun 04, 2009 
Printed Page 199
3rth and 4th regex

Both the following regular expressions end in /s which I think is a modifier of some sort but one that is not yet introduced in the book.

The regex are:
s/\s*(.*?)\s*$/$1/s

and
s/^\s*((?:.*\S)?)\s*$/$1/s

I would presume the last s would need to be removed in both cases

Anonymous  Jun 04, 2009 
Printed Page 205
regex under first paragraph

The regex is:
(?: [a-z0-9]\. | [a-z0-9][-a-z0-9]*[a-z0-9]\. )+
the first part should read (?: [a-z0-9]+\. | ...
The + is added to allow for more than one character

The same problem exists in the second regex on the same page. The second example should be correct to (?: [a-z0-9]{1,63}\. | ...

Anonymous  Jun 04, 2009 
Printed Page 222
last paragraph

"On page 198, we came up with "(\.|[^"\])*" to..."
should be:
"On page 198, we came up with "(\.|[^\"])*" to..."

^"\ continues to be used throughout the next several examples.
The results are shown for ^\"

Anonymous   
Printed Page 230
Top of side bar

The text after the solid arrow says succesfull match of regex component and even though in this case there is none the arrow is used. The text should read initial match attempt or the arrow should be replaced by the ....> version

Anonymous  Jun 05, 2009