Questions tagged «ereg»

4
如何在PHP中将ereg表达式转换为preg?
由于自PHP 5.3.0起不推荐使用POSIX正则表达式(例如,egeg),所以我想知道一种将旧表达式转换为PCRE(与Perl兼容的正则表达式)(preg)的简便方法。。 例如,我有这个正则表达式: eregi('^hello world'); 如何将表达式转换为preg_match兼容的表达式? 注意:该帖子充当与从ereg到preg转换相关的所有帖子的占位符,并用作相关问题的重复选项。请不要关闭此问题。 有关: 如何将PHP的eregi更改为preg_match 将ereg_replace更改为等效的preg_replace
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.