vineri, 16 octombrie 2009

[C#][Regex] TimeStamp

I need a regex expression in order to validate a time stamp in the following template:
It contains:
- days (max 9999 -> 0 - 9999)
- hours (00-23)
- minutes (00-60)
- seconds (00-60)
- milliseconds (000-999)

To validate only digits it can be used:

To validate the hours/minutes/seconds it can be used:

to validate a timestamp in the following format it can be used the following regular expression: (HHHH(0-9999):MM(00-59):SS(00-59).mmm(000-999)):

Niciun comentariu:

Trimiteți un comentariu