The basic functionality of the regular expression component allows for the matching of a regular expression in a string in numerous ways, the matching of a regular expression in a set of files both singly and multiply, the changing of data in a string using regular expression matching, and the changing of data in a set of files using regular expression matching. Listed below is a very brief explanation of the Properties, Methods, and Events that make up the regular expression component. Complete information about the regular expression component is in the Help File which is distributed with the component.
The most basic way to use the regular expression component is:
Specify a regular expression
Specify a string to search or a set of files to search
Call the appropriate function
Optionally handle the appropriate event for more specific information about the regular expression match which is found.
Expression is a string representing the actual regular expression.
ExpressionOptions is a set of options that allows the Expression to be interpreted in the most popular ways for a regular expression.
StringToMatch is a string to search for a regular expression.
FilesToMatch is a file specification of files to search for a regular expression. May contain * and ? wildcard characters.
FormatString is a replacement string for changing strings or files.
MatchOptions is a set of options for treating the actual data that is being searched.
DirectoryRecursion is a boolean flag that allows the FilesToMatch to recurse subdirectories.
SaveExtension is a backup extension which may be applied to files which will be changed.
MergeCopy is a boolean flag involved when strings are changed.
ContinueFiles is a boolean flag which controls continuation of file search and replace when erros occur.
Locale is a C++ locale that may be applied to regular expression searches.
LocaleDll is a DLL which allows localization support of syntax and messages.
MatchAll is called to match an entire string against a regular expression
Match is called to match the beginning of a string against a regular expression.
Search is called to match any part of a string against a regular expression
Grep is called to match one or more parts of a string against a regular expression.
Merge is used to change a string
FindFiles allows the searching of a set of files for a regular expression.
GrepFiles allows the searching of a set of files for multiple regular expressions per file.
ChangeFiles is used to change files.
Format is used to format the output of a match from an appropriate event handler.
ParseExpression is used to parse a regular expression to determine if there are any errors in it.
GetExpressionError returns an error string if the regular expression has been parsed and is invalid.
NumberOfSubexpressions returns the number of sub-expression in a regular expression.
GetChangeFilesErrors returns a list of possible errors which could occur when attempting to change files.
GetFindFilesErrors returns a list of possible errors which could occur when attempting to find files.
GetGrepFilesErrors returns a list of possible errors which could occur when attempting to grep files.
OnMatching is the event handler for the Match and MatchAll methods.
OnSearching is the event handler for the Search method.
OnGrepping is the event handler for the Grep method.
OnMerging is the event handler for the Merge method.
OnFindFiles is the event handler for the FindFiles method.
OnGreppingFiles is the event handler for the GrepFiles method.
OnChangingFiles is the event handler for the ChangeFiles method.