is highlighted, indicating that those are matches for the regular expression.
The regular expression engine first looks for the literal character uppercase
. Each character is examined in
turn to determine if there is or is not a match.
If a match is found, the regular expression engine then looks at the next character to determine if the follow-
ing character is an uppercase
. If that too matches, it looks to see if the third character is an uppercase
all three of those characters match, the engine next checks to see if the fourth character is a numeric digit.
If so, it checks if the fifth character is a numeric digit. If that too matches, it checks if the sixth character is a
numeric digit. If that too matches, the entire regular expression pattern is matched. Each match is displayed
in OpenOffice.org Writer as a highlighted sequence of characters.
You can check the
file for lines that contain a match for the pattern
utility from the command line, as follows:
findstr /N DOR[0-9][0-9][0-9] PartNumbers.txt
As you can see in Figure A-12, lines containing the same two matching sequences of characters,
, are matched. If the directory that contains the file
is not the current directory in
the command window, you will need to adjust the path to the file accordingly.
The Komodo Regular Expression Toolkit can also be used to test the pattern
. As you can see in
Figure A-13, the test text
Appendix A: Simple Regular Expressions
bapp01.qxd:bapp01 10:47 325