Match Zero to Two Occurrences
Open OpenOffice.org Writer, and open the sample file
Use Ctrl+F to open the Find And Replace dialog box.
Check the Regular Expressions and Match Case check boxes.
Enter the regular expression pattern
in the Search For text box; click the Find All
button, and inspect the matches that are displayed in highlighted text, as shown in Figure A-19.
Notice that on some lines, only parts of a part number are matched. If you are puzzled as to why that is,
refer back to the problem definition. You are to match a specified sequence of characters. You haven’t
specified that you want to match a part number, simply a sequence of characters.
Appendix A: Simple Regular Expressions
bapp01.qxd:bapp01 10:47 338