Hey I need a regex for the following cases:
- von 08:00-12:00uhr und 12:00-22:00 uhr
- von 08:00-12:00 uhr
- von 08:00-12:00 uhr
- von 08:00-12:00
- 08:00-12:00
so the regex should handle input like that:
(von)?_?0?[0-23]:[00-59]_?(Uhr|uhr)?((bis)?_?0?[0-23]:[00-59]_?(Uhr|uhr))?
I tried a lot but the best match after reading in the wiki was:
(von)?([01]\d|2[0-3]):?([0-5]\d)$(uhr|Uhr)?((und)?(von)?([01]\d|2[0-3]):?([0-5]\d)$)
Can you give me an advise how i can handle this problem? Is the way i test the Dateformat right?