GetFirstWildcardMatch

Top  Previous  Next

function GetFirstWildcardMatch(sSource, sFindWildcard) As String

 

Searches in sSource for the first occurrence of sFindWildcard. sFindWildcard is a Wildcard with a start text, an asterisk and an end text with the syntax:

 

StartText*EndText

 

GetFirstWildcardMatch is case-sensitive. If sFindWildcard is not found, GetFirstWildcardMatch returns an empty string.

 

Parameters

 

sSource ... String expression sought.
sFindWildcard ... Wildcard expression being searched (StartText*EndText).

 

Example:

Dim s, s2

 

= "a number or a text"

s2 = GetFirstWildcardMatch(s, "or*xt")

' returns s2 = "or a text"




Translate document: