Okay so I want to move all digits from end of the line to the front of the line, example of lines:
example123
example321
example2920
expected output:
123example
321example
2920example
the following sed command works to place numbers at the start to end -
sed -E 's/^([0-9]+)(.*)/\2\1/' file
input of this is
123example
321example
and output is
example123
example321
but when trying to do the same for numbers at the end moved to the front I can't seem to do it..
I've tried changing
^
to
$
and other things but I'm new to sed so I don't really understand alot.