I wish there was a simple utility that would do this, as regular expressions scare me. I'd like to update the following to preg_replace()
if anyone could explain to me how.
eregi_replace('([a开发者_开发百科-zA-Z0-9_]{'.$min_char.','.$max_char.'})','', $password)
Thanks for any help.
Should be just
/([a-zA-Z0-9_]{$min_char,$max_char})/
preg_replace('/([a-zA-Z0-9_]{'.$min_char.','.$max_char.'})/','', $password)
As far as I can see only the delimiter are missing.
精彩评论