Home >Backend Development >PHP Tutorial >ereg_replace 用法请问

ereg_replace 用法请问

WBOY
WBOYOriginal
2016-06-13 10:03:09857browse

ereg_replace 用法请教
$str   =   "111abc222 "
字符串中的abc可能是其它的字符
怎么能替换掉111和222之间的字符呢

------解决方案--------------------
ereg_replace( '^111{a-zA-Z}{3}222$ ', ' ',$str);

把问题写清楚点,,, 我也刚看不久,,学习学习,,可能不正确

Statement:
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