diff --git a/advanced-iterators.html b/advanced-iterators.html index 483b98f..d012cc9 100755 --- a/advanced-iterators.html +++ b/advanced-iterators.html @@ -36,7 +36,7 @@ S = 6 T = 2 E = 4 -
Puzzles like this are called cryptarithms or alphametics. The letters spell out actual words, but if you replace each letter with a digit from 0–10, it also “spells” an arithmetic equation. The trick is to figure out which letter maps to each digit. All the occurrences of each letter must map to the same digit, no digit can be repeated, and no “word” can start with the digit 0.
+
Puzzles like this are called cryptarithms or alphametics. The letters spell out actual words, but if you replace each letter with a digit from 0–9, it also “spells” an arithmetic equation. The trick is to figure out which letter maps to each digit. All the occurrences of each letter must map to the same digit, no digit can be repeated, and no “word” can start with the digit 0.
diff --git a/regular-expressions.html b/regular-expressions.html
index d18af91..edd23e9 100755
--- a/regular-expressions.html
+++ b/regular-expressions.html
@@ -282,7 +282,7 @@ body{counter-reset:h1 5}
⁂
So far you’ve concentrated on matching whole patterns. Either the pattern matches, or it doesn’t. But regular expressions are much more powerful than that. When a regular expression does match, you can pick out specific pieces of it. You can find out what matched where.
This example came from another real-world problem I encountered, again from a previous day job. The problem: parsing an American phone number. The client wanted to be able to enter the number free-form (in a single field), but then wanted to store the area code, trunk, number, and optionally an extension separately in the company’s database. I scoured the Web and found many examples of regular expressions that purported to do this, but none of them were permissive enough.
Here are the phone numbers I needed to be able to accept: