I have made a match with “\d{2}-[A-z]{3}-\d{2,4}” getting correct date from string, and now I try to use assign and this expression:
If(Regex.IsMatch(myString_IEnumerable,“\d{2}-[A-z]{3}-\d{2,4}”),Regex.Match(myString_IEnumerable,“\d{2}-[A-z]{3}-\d{2,4}”).Value,string.Empty)
to check that the string starts or contain a date like 05-NOV-19, but I got a compiler error.
Any one who can tell me whats wrong?
If the string don’t contain the date I don’t need it.
How to use it in Uipath? myArray return strings that start with a date, and som does not. I only want to read those who start with a date and pass if the string start with text.
myArray
string (0) 15-NOV-19 This is first teststring
string (1) 15-NOV-19 This is second teststring
string (2) This is also a teststring
string (3) 15-NOV-19 This is third teststring
Could be moore strings and I don¨t know witch that’s missing date.
Have tried string contains, string start and some other methods. I guess IF is only way, but I don’t get it right.