RegEx Help

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
 
K

Karl Seguin

hahah..That's a funny requirement for some reason :)

try

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

Karl
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

RegEx 0
RegEx Help 2
My regex kung-fu is not strong =( 0
Tasks 1
Need Help for DBA Class 0
regex question 7
Help with code plsss 0
Problems with using event handlers for button and textarea input 1

Members online

Forum statistics

Threads
473,797
Messages
2,569,646
Members
45,374
Latest member
VernitaBer

Latest Threads

Top