-
Posted by BruceK on Sun, 03 Jan 2010 20:01:40
While checking out the Table 6-7 on page 92 I see an apparent error:
%a a
...
%a no string matched
The %a is duplicated on line 4 and incorrectly says the matched string is "no string matched". Since the test string is "abc ABC 123 !@# \n \000 %" the first one is the correct answer. I did not quite noodle out what that second one was really meant to be searching for before deciding to point it out.
I also think that there is a typo in line 5:
%a-%s Abc
should be
%a-%s abc
(lower case a) or perhaps:
%a-%s c
since the '-' means "shorted possible sequence". To get "abc" I would think (but have not tested) that the pattern should be:
%a*%s abc
to get all the characters followed by a space.
I also question the line:
%a? A
I think it should be either:
%a? a
or
%u? A
Bruce