Can only parse one date from string of text

HI All,

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.

Any ideas how i can grab the other 3?

I know the regex works. here is my wizard:

Your For Each loop should be iterating over all 4, as your Regex is defined correctly. Can you share your workflow?

Hi Anthony,

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)

That’s a tough regex to crack, since you have one set of information containing “5 pm”.

Try this regex:


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.