On Feb 7, Stuart Clark said: >How do I match a pattern that starts with a 4 and has 16 numbers in it. > >I try /^4\d{16}/;
That's quite vague. Do you mean the string must start with a 4 and consist ONLY of 16 digits? /^4\d{15}$/ >Also how do I match a 16 digit number that starts with either 6565 or >starts with a number in the range of 555000-555100 > >/(^6565(\d{16})|^{555000-555100}(\d{16}))/ Again, you put \d{16} after you already matched some numbers. /^(?:6565\d{12}|555(?:0\d\d|100)\d{10})$/ -- Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/ RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/ ** Look for "Regular Expressions in Perl" published by Manning, in 2002 ** <stu> what does y/// stand for? <tenderpuss> why, yansliterate of course. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]