请问一下php正则表达式

WBOY
Release: 2016-06-13 12:18:56
Original
1001 people have browsed it

请教一下php正则表达式
会员号为11位字母和数字组合,
前三位为“M15”后一位为”M”结尾。英文字母大小写可以忽略

------解决思路----------------------

<br />$str='M15452s8f1M';<br />if(preg_match('/^M15([A-Za-z0-9]{7})M$/i',$str,$m)){<br />	echo 'OK';<br />}else{<br />	echo 'NO';<br />}<br />
Copy after login

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template