I can check a string if it observes this format "XXw XXd XXh XXm" using the following Regex:
(\d{1}|\d{2})w (\d{1}|\d{2})d (\d{1}|\d{2})h (\d{1}|\d{2})m
XX: whole numbers
I want to check if there is at least one of XXw, XXd, XXh, XXm in the string, any way to do it via Regex?
Hamza
source
to share