RegEx Help

  • Thread starter Thread starter George Durzi
  • Start date Start date
G

George Durzi

I'd like to write a RegEx that validates the format of a file name

- The first two letters should be "dc" or "iq"
- Followed by a period
- Any six integers
- Followed by a period
- The letters "lw", or "cw"
- Followed by ".txt"

Valid examples for the file names are

dc.050277.lw.txt
dc.050277.cw.txt
iq.050277.lw.txt
iq.050277.cw.txt

I appreciate your help
 
hahah..That's a funny requirement for some reason :)

try

(dc|iq)\.\d{6}\.(lw|cw)\.txt

Karl
 
Back
Top