Match Options
Defines how the string to search is viewed by the matching algorithms.

The user can choose one or more of a set of options for determining how the matching algorithms view the string to search. A number of these options involve how the beginning and ending of the string are viewed. The regular expression syntax contains special sequences for denoting the beginning and end of a line, the beginning and end of a buffer, and the beginning and end of a word. The default setting for this option, MatchDefault, will be the desired setting for most programmers. The individual settings are:
Option Type Explanation
MatchDefault - The default value, indicates that the beginning of the string represents the start of a line, the start of a buffer, and (possibly) the start of a word. Also implies that the end of the string represents the end of a line, the end of the buffer and (possibly) the end of a word. Implies that a dot sub-expression "." will match both the newline character and a null.
MatchNotBeginningOfLine - When this flag is set then the beginning of the string does not represent the start of a new line.
MatchNotEndOfLine - When this flag is set then the end of the string does not represent the end of a line.
MatchNotBeginningOfBuffer - When this flag is set then the beginning of the string does not represent the start of a buffer.
MatchNotEndOfBuffer - When this flag is set then the end of the string does not represent the end of a buffer.
MatchNotBeginningOfWord - When this flag is set then the beginning of the string can not match the start of a word.
MatchNotEndOfWord - When this flag is set then the end of the string can not match the end of a word.
MatchNotDotNewline - When this flag is set then a dot expression "." can not match the newline character.
MatchNotDotNullCharacter - When this flag is set then a dot expression "." can not match a null character.
MatchShortest - When this flag is set, then the first string matched is returned, rather than the longest possible match. This flag can significantly reduce the time taken to find a match, but what matches is undefined.
MatchNotNullString - When this flag is set, then the expression will never match a null string.
MatchContinuous - When this flags is set, then during the Grep or GrepFiles method, each successive match must start from where the previous match finished.
MatchPartial - When this flags is set, then during the Match, Search, or Grep methods, a match can be found which matches characters at the end of the StringToMatch which does not completely match all of the regular expression although it might have if the StringToMatch was longer. This allows for partial matching at the end of a string.
The type is just an explanation of the way the option operates, whether single or composite. The single type means that adding or deleting this option only affects the particular option and possibly MatchDefault. In the case of the composite type of MatchDefault
Adding MatchDefault automatically deletes all of the MatchNot... options
Adding any of the MatchNot... options automatically deletes MatchDefault.
Deleting all of the MatchNot... options automatically adds MatchDefault
From this it can be seen that MatchDefault is a composite shorthand for saying that none of the MatchNot.. options are on. |