如何将下面的表达式从POSIX转换为PCRE


How do I convert the following expression from POSIX to PCRE?

我希望有一个简单的实用程序可以做到这一点,因为正则表达式让我害怕。如果有人能告诉我怎么做,我想将以下内容更新到preg_replace()

eregi_replace('([a-zA-Z0-9_]{'.$min_char.','.$max_char.'})','', $password)

谢谢你的帮助

应该是

/([a-zA-Z0-9_]{$min_char,$max_char})/
preg_replace('/([a-zA-Z0-9_]{'.$min_char.','.$max_char.'})/','', $password)

据我所知,只有分隔符丢失了