I have a text file with hundreds of words like
donkey32 horse4 snake512
and I want to turn them into
32donkey 4horse 512snake
What is the easiest way to do this?
Thank you very much in advance!
/Daniel
use a regex to grab the numbers, replace them and put them in front.
$string = preg_replace("/(\\w+)(\\d+)/", "$2$1", $string);
😃
Geesh man, let him figure out something on his own