Top  Previous  Next

function GetAllWildcardMatches(sSource, sFindWildcard) As String


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




GetAllWildcardMatches is case-sensitive. Each match is listed in a new line, separated with a carriage-return/line-feed. If sFindWildcard is not found, GetAllWildcardMatches returns an empty string.




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



Dim s, s2


= "a number or a text or a date"

s2 = GetAllWildcardMatches(s, "or*t")

' returns s2 = "or a t"#13#10"or a dat"


The extracted lines can be sorted with the function SortStringLines.

Translate document: