How to Parse date value in a string?

Hi UiPath,

Let say I have the extracted string from get text activity below:

“Please inform HPE the request delivery date is 12/12/2023”

How can I extract the 12/12/2023?

Thanks in advance!

you can use regex for this purpose

image

System.text.RegularExpressions.Regex.Match(YourString,“(?<=is\s).*”).Tostring
Regards

Hi @alvin.c.apostol26

Try this:
output = system.text.regularexpressions.regex.match(str_var, “\d+/\d+/\d+”).value

Hope it helps.

Hi @alvin.c.apostol26

You can try with Regex Expression

System.Text.RegularExpressions.Regex.Match(YourString,"\d{2}.\d{2}.\d{4}").Tostring

Regards
Gokul

1 Like

Hi @Gokul001 ,

In UiPath in what activity can I invoke this regular expression?

You can Use Assign activity @alvin.c.apostol26

Reference

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.