To check weather scraped string contains a date or not?

I used screen scraping to scrape a particular area. Now i want to check weather the scraped string is a valid date or not?
How can i achieve this? The date format is MM/dd/yy.

1 Like

hope this expression would help you resolve this
bool_exists = system.text.regularexpressions.regex.ismatch(inputstring,"\d{2}.\d{2}.\d{2,4}")
this expression will give us a boolean output

Cheers @Vaibhav_Gupta

1 Like

Hi , let’s say the output of your scraped text is in Variable Text1

Create a new Datetime variable ex: Date1

The use
Assign activity
Date1 = Datetime.parseexact(Text1, “MM/dd/yy”)
Now use if condition to check
Date1 = Datetime.Minvalue