Thankyou for using Microsoft Q&A platform and thanks for posting your question here.
As per my understanding , it looks you are trying to check if the string contains valid date or not using regular expressions in dataflow. Please let me know if my understanding is incorrect.
-
(19|20)\d\d
represents year between 1900-01-01 till 2099-12-31 - The month is matched by
0[1-9]|1[012]
-
(0[1-9]|[12][0-9]|3[01])
matches the dates between 1st Jan to 31st Dec -
[- /.]
is for the delimiter , matches for either-
or/
You can use : regexMatch(regexReplace(Title,'[@!\sa-zA-Z]',''),
^(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\d\d$
) expression to achieve your requirement.
Here we are first trying to remove A-Z characters/any special characters from the Column so as to get only the date part to perform the matching of the pattern.
Then checking for the pattern : dd/mm/yyyy
or dd-mm-yyyy
. If this matches, it should return true.
Hope this will help. Please let us know if any further queries.
------------------------------
- Please don't forget to click on or upvote button and kindly take the satisfaction survey whenever the information provided helps you.
Original posters help the community find answers faster by identifying the correct answer. Here is how - Want a reminder to come back and check responses? Here is how to subscribe to a notification
- If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators