Class WordWildcards
Word's Find with "Use wildcards" (WQ-0121): its pattern language turned into a .NET regular expression, and its
replacement language (\1, ^&) expanded for a match. A wildcard search always matches case, as
Word's does.
public static class WordWildcards
- Inheritance
-
WordWildcards
- Inherited Members
Remarks
? is any one character; * any run of characters, as few as make a match (Word's is lazy, and
crosses spaces); @ one or more of what is before it; {n}, {n,}, {n,m} that many of it;
[abc], [a-z] one of a set and [!a-z] one not in it; < and > the start and
end of a word; ( ) a group a replacement names as \1 to \9; \ makes the next character
literal; ^t is a tab and ^^ a caret. Every other character is itself.
Fields
- MaxPatternLength
The longest pattern translated.
Methods
- Expand(string, TextMatch)
The replacement Word makes for a wildcard match:
\1to\9are the match's groups,^&the whole match,^ta tab,^^a caret,</code> makes the next character literal.
- ToRegex(string)
Turns a Word wildcard pattern into a .NET regular expression.