M
Marcus =?iso-8859-15?Q?Sch=F6neborn?=
Currently, I have written a function to do some sort of pattern
matching:
Dim delims As New Collection
delims.Add " <"
delims.Add "@"
delims.Add ">"
Dim tokens As Collection
tokens = UnDelimit("Marcus Schöneborn <[email protected]>", delims)
? tokens.Count ' 4
? tokens(1) ' "Marcus Schöneborn"
? tokens(2) ' "divZero"
? tokens(3) ' "googlemail.com"
? tokens(4) ' ""
Is there a simpler way to call this by making a "literal" collection,
think of it like
Dim tokens As Collection
tokens = UnDelimit("...", {" <", "@", ">"})
Or is there a way to get C-like function varargs, so I can use it like
Dim tokens As Collection
tokens = UnDelimit("...", " <", "@", ">")
Or, alternatively: is there a way to make the VBScript.RegExp object
support . matching newlines?
matching:
Dim delims As New Collection
delims.Add " <"
delims.Add "@"
delims.Add ">"
Dim tokens As Collection
tokens = UnDelimit("Marcus Schöneborn <[email protected]>", delims)
? tokens.Count ' 4
? tokens(1) ' "Marcus Schöneborn"
? tokens(2) ' "divZero"
? tokens(3) ' "googlemail.com"
? tokens(4) ' ""
Is there a simpler way to call this by making a "literal" collection,
think of it like
Dim tokens As Collection
tokens = UnDelimit("...", {" <", "@", ">"})
Or is there a way to get C-like function varargs, so I can use it like
Dim tokens As Collection
tokens = UnDelimit("...", " <", "@", ">")
Or, alternatively: is there a way to make the VBScript.RegExp object
support . matching newlines?