develooper Front page | perl.beginners | Postings from February 2002

reg exp question

Thread Next
From:
Stuart Clark
Date:
February 7, 2002 04:11
Subject:
reg exp question
Message ID:
000001c1afd0$694ac250$b945a4cb@yogi
How do I match a pattern that starts with a 4 and has 16 numbers in it.
 
I try /^4\d{16}/;
 
 
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}))/

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About