怎么样
/A(?!XML)[a-z][w0-9-]*/i
用法:
if (preg_match('/A(?!XML)[a-z][w0-9-]*/i', $subject)) { # valid name} else { # invalid name}说明:
A Beginning of the string(?!XML) Negative lookahead (assert that it is impossible to match "XML")[a-z] Match a non-digit, non-punctuation character[w0-9-]* Match an arbitrary number of allowed characters/i make the whole thing case-insensitive



