Regular expression

0 views
Skip to first unread message

singba

unread,
Apr 5, 2007, 11:45:28 PM4/5/07
to JSF/AJAX技术讨论
Today, I study a little regular expression knowledge.
This is my first expression:
/^chr([X,Y,M,x,y,m]|\d{1,2}):\d{1,9}-\d{1,9}$/;

match: chr1:1223424-324324
chrX:2323-34
chrm:3-34324
chr20:34-4534
not match:sdf:3320-325325
cdsf3434:34234

And I found a web site about regular expression:
http://regexlib.com/Default.aspx

singba

unread,
Apr 5, 2007, 11:48:43 PM4/5/07
to JSF/AJAX技术讨论
I made a mistake,

matches
non-matches

Reply all
Reply to author
Forward
0 new messages