Public Function EgrepOrStringsToRegexPattern( _ ByVal vOrStrings As Variant _ , Optional ByVal vSeparator As Variant _ ) As Variant
EgrepOrStringsToRegexPattern("If|On") = "[IO][fn]" EgrepOrStringsToRegexPattern("Unique|Dups") = "[UD][nu][ip][qs]"See also:
CharactersToSQLInExpression Function Like Operator (Visual Basic) egrep Program (UNIX)This function will create an expression that, with Pattern Matching enabled, can be used to locate occurrences of more than one word using a single Find command within Microsoft products like Visual Basic, Access, etc. Function interprets a string "Unique|Dups" as a pattern that will match text containing either "Unique" or "Dups".
vOrStrings: String containing the list or words (or phrases) each separated by the string vSeparator. Function returns Null if vOrStrings is Null or cannot be fixed up to a String.
vSeparator: The string which separates the words (or phrases) within string vOrStrings. vSeparator defaults to the vertical-bar character (|) if it is missing or Null or cannot be fixed up to a String.
Note: Function uses Binary comparisons to locate the separator string vSeparator within the string vOrStrings.
Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.