Réf. : Regular expressions in Word/WordPerfect?

Subject: Réf. : Regular expressions in Word/WordPerfect?
From: Mark Craig <mcraig -at- WINCAPSOFTWARE -dot- COM>
Date: Tue, 17 Nov 1998 08:10:27 +0100

Word (at least Word 97) calls regular expressions wildcards.

--- start: snipped verbatim from Word97 help © Microsoft Corporation
(please don't sue me) ---
Examples of search wildcards

You can fine-tune a search by using any of the following wildcards. In the
Find or Replace dialog box, click More if you don't see the Use wildcards
check box. Then select the Use wildcards check box and type the wildcard
and any other text in the Find what box.

Tip For a quick way to enter a wildcard in the Find what box, click
Special and then click a wildcard.

To find Use this
wildcard
Examples
Any single character ? s?t finds "sat" and "set."
Any string of characters * s*d finds "sad" and "started."
One of the specified characters [ ] w[io]n finds "win" and "won."
Any single character in this range [-] [r-t]ight finds "right" and
"sight." Ranges must be in ascending order.
Any single character except the characters inside the brackets [!]
m[!a]st finds "mist" and "most," but not "mast."
Any single character except characters in the range inside the brackets
[!x-z] t[!a-m]ck finds "tock" and "tuck," but not "tack" or "tick."
Exactly n occurrences of the previous character or expression {n}
fe{2}d finds "feed" but not "fed."
At least n occurrences of the previous character or expression {n,}
fe{1,}d finds "fed" and "feed."
From n to m occurrences of the previous character or expression {n,m}
10{1,3} finds "10," "100," and "1000."
One or more occurrences of the previous character or expression @ lo -at- t
finds "lot" and "loot."
The beginning of a word < <(inter) finds "interesting" and "intercept,"
but not "splintered."
The end of a word > (in)> finds "in" and "within," but not
"interesting."
Notes

· You can use parentheses to group the wildcards and text and to
indicate the order of evaluation. For example, search for "<(pre)*(ed)>" to
find "presorted" and "prevented."
· To search for a character that's defined as a wildcard, type a
backslash (\) before the character. For example, search for "\?" to find a
question mark.
· You can use the \n wildcard to search for an expression and then
replace it with the rearranged expression. For example, type (Newton)
(Christie) in the Find what box and \2 \1 in the Replace with box. Word
will find "Newton Christie" and replace it with "Christie Newton."
--- end: snipped verbatim from Word97 help © Microsoft Corporation (please
don't sue me) ---


From ??? -at- ??? Sun Jan 00 00:00:00 0000


Previous by Author: Re: SGML Books (But where's the DSSSL?)
Next by Author: Réf. : Applying two styles in a single paragraph in Word
Previous by Thread: frame save-as problem
Next by Thread: [CE-L] QUERY: Can WordPerfect or Word automatically create a list - YES!


What this post helpful? Share it with friends and colleagues:


Sponsored Ads