L
Lisa Bogart
I am trying to take a string and parse it out into multiple strings
based on a pattern but am stuck and am hoping someone can give me a
clue.
My pattern looks like so: sMatch =
"\d\d\d\d-\d\d-\d\d\s\d\d:\d\d\sby\s<a class=link href=" & Chr(34) &
"javascript:jsOpen[\s\S]*"
What I want is to take a single string and for anything that starts
with a date/time and "<a class=link href=" & Chr(34) &
"javascript:jsOpen", divide the single string into multiple strings.
The trouble seems to be the last part of the pattern "[\s\S]*".
Anything can appear after the first part of the string including
linefeeds, tabs, form-feeds, etc. The above pattern gives me the
whole string instead of several as I expected.
I have tried various combinations of Singleline and Multiline options.
sMatch = "^(\d\d\d\d-\d\d-\d\d\s\d\d:\d\d\sby\s<a class=link href=" &
Chr(34) & "javascript:jsOpen)(.*)$" - gives me the whole string.
sMatch = "^(\d\d\d\d-\d\d-\d\d\s\d\d:\d\d\sby\s<a class=link href=" &
Chr(34) & "javascript:jsOpen)[\s|\S]*" - gives me the whole string
sMatch = "^(\d\d\d\d-\d\d-\d\d\s\d\d:\d\d\sby\s<a class=link href=" &
Chr(34) & "javascript:jsOpen).*" - gives me several strings but those
strings end when the first chr(10) is encountered after the first part
of the pattern.
I have tried the RegeEx.Split where I split by patterns similiar to
above and this gets me closer but then I lose the first part of the
string that matches the pattern.
Any ideas or advice would be appreciated.
based on a pattern but am stuck and am hoping someone can give me a
clue.
My pattern looks like so: sMatch =
"\d\d\d\d-\d\d-\d\d\s\d\d:\d\d\sby\s<a class=link href=" & Chr(34) &
"javascript:jsOpen[\s\S]*"
What I want is to take a single string and for anything that starts
with a date/time and "<a class=link href=" & Chr(34) &
"javascript:jsOpen", divide the single string into multiple strings.
The trouble seems to be the last part of the pattern "[\s\S]*".
Anything can appear after the first part of the string including
linefeeds, tabs, form-feeds, etc. The above pattern gives me the
whole string instead of several as I expected.
I have tried various combinations of Singleline and Multiline options.
sMatch = "^(\d\d\d\d-\d\d-\d\d\s\d\d:\d\d\sby\s<a class=link href=" &
Chr(34) & "javascript:jsOpen)(.*)$" - gives me the whole string.
sMatch = "^(\d\d\d\d-\d\d-\d\d\s\d\d:\d\d\sby\s<a class=link href=" &
Chr(34) & "javascript:jsOpen)[\s|\S]*" - gives me the whole string
sMatch = "^(\d\d\d\d-\d\d-\d\d\s\d\d:\d\d\sby\s<a class=link href=" &
Chr(34) & "javascript:jsOpen).*" - gives me several strings but those
strings end when the first chr(10) is encountered after the first part
of the pattern.
I have tried the RegeEx.Split where I split by patterns similiar to
above and this gets me closer but then I lose the first part of the
string that matches the pattern.
Any ideas or advice would be appreciated.