P
Phil Hibbs
This is my regular expression:
lineRegEx.Pattern = " *([^ ]+) ?(.*) *"
What I want is for it to strip leading and trailing spaces, and then
split the remainder on the first space that it encounters. What it
does in practice is to return the entire string as the first match.
Any ideas what I'm doing wrong?
I've tested it here:
http://www.regular-expressions.info/vbscriptexample.html
....and it shows the same behaviour, but the same pattern works here:
http://www.regular-expressions.info/javascriptexample.html
I can only assume that VBA is not using the regular expression
implementation that I have been led to expect.
Phil Hibbs.
lineRegEx.Pattern = " *([^ ]+) ?(.*) *"
What I want is for it to strip leading and trailing spaces, and then
split the remainder on the first space that it encounters. What it
does in practice is to return the entire string as the first match.
Any ideas what I'm doing wrong?
I've tested it here:
http://www.regular-expressions.info/vbscriptexample.html
....and it shows the same behaviour, but the same pattern works here:
http://www.regular-expressions.info/javascriptexample.html
I can only assume that VBA is not using the regular expression
implementation that I have been led to expect.
Phil Hibbs.