初学PHP正则表达式
摘要:
1. 想要匹配开头5个字符为字母数字的字符串check that the first five characters in the string are alpha numeric characters.preg_match('/^[A-Za-z0-9]{5}/', $test_string); preg_match('/^\w{5}/', $test_string);\w specifies any alpha numeric characters plus the underscore character (_). $test_string = " 阅读全文
posted @ 2012-11-07 10:06 胡博的博客 阅读(190) 评论(0) 推荐(0)
浙公网安备 33010602011771号