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)
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.