开发者

How do I split this word using PHP?

There are many words like this.....

ma开发者_JAVA技巧thewthomas256
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)

The regex is "all digits (\d+) at the end of the line ($)". This works in a line-based manner because of the m modifier and globally over all lines because of the g modifier.


$remove = array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9");
$onlynames = str_replace($remove, "", "name here");


preg_replace("/\d/", "", input)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜