Errata
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
| Version |
Location |
Description |
Submitted By |
| Printed |
Page 40
3rd paragraph under section "Toward a more..." |
The book says that "\.[0-9]*" is used to match a period followed by any number of optional digits. By any number of optional digits, is this meant to include 0 digits?
I can't recall seeing numbers printed with a decimal point when there's no numerals after the point. Trailing zeroes are sometimes used, but I don't believe I've ever seen a decimal point followed by nothing.
|
Anonymous |
| Printed |
Page 74
last line |
the marker that shows the match for http://www.slashdot.com should extend to include the exclamation mark. This is the purpose of the example I believe
|
Anonymous |
| Printed |
Page 139
4th paragraph |
You say:
.* first internally match as much as it can («¡Hola!»)
I think:
.* first internally match as much as it can («Hola!»).
The sign "¡" will match earlier.
|
Anonymous |
| Printed |
Page 215
top half |
This is for the 3rd edition.
When trying to solve the CSV "empty field" problem by changing from
[^",]+
to
[^",]*
It is mentioned that this creates extra empty fields, which is true. The misleading part is the test output is shown as if the regex will still parse commas inside of quotes correctly. e.g., one of the result fields is shown as:
10,000
This didn't jibe with my own test case and I spent a lot of time trying to understand what *should* happen and what was happening.
With the bad regex:
([^",]*)|"((?:[^"]|"")*)"
The first alternative will always be successful, so the regex will always treat a comma as a field delimiter. And therefore, with the "bad" attempt at matching empty fields, the test output wouldn't be as shown on the page, given our dataset from page 213.
|
Anonymous |
"Nail it to your desk unless you want to be constantly retrieving it from your co-workers. If I might be permitted a Spinal Tap reference, this one goes to eleven. If you ever use regular expressions, are thinking of using regular expressions or are in the same room as a regular expression, then you need this book."
--Simon P. Chappell, Slashdot.org