I am trying to parse this string:
“Submission Window Date(s): 2018-05-07-04:002018-05-14-04:00\nSubmission Window Date(s): 2019-05-01-04:002019-07-01-04:00”
And grab 4 dates: 2018-05-07-04, 2018-05-14, 2019-05-01, 2019-07-01
I have the right regex string to do things (Regex.Match(strValues, “(20\d{2}-\d{1,2}-\d{2})”,RegexOptions.Multiline).Value
and I have for/each dialog open with the regex performing the match and the assign just grabs the first date value.
I created an xml with the string data attached. I need to just parse out the first part of each line and the date value on that line (without the timestamp)RegexTextandDateExtraction.xaml (7.6 KB)
If you iterate over that, the first result will be the text information followed by the date, and so on. So your first result will be “Letter of Intent Deadline Date”, and your second will be “2020-08-03”.
Alternatively, you can break your results into two regexes, (([A-z]|\(|\)|\d\s(am|pm))+\s*)+ and (\d{4}-\d{1,2}-\d{1,2}), and iterate over your names and dates separately.