There are many words like this.....
mathewthomas256
alexcannon5623
kohlanjame9568
nancycherikom257
how do I remove numbers from above names using PHP? there are around 200k names like this
preg_replace("/\d+$/gm", "", input)
正则表达式是“行尾的所有数字 ( \d+
) ( $
)”。由于修饰符,这以基于行的方式工作,并且由于m
修饰符而在所有行上全局工作g
。
$remove = array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9");
$onlynames = str_replace($remove, "", "name here");
preg_replace("/\d/", "", 输入)