I'm trying to move matched characters to the end of sentence.
from
300p apple in house
orange 200p in school
to
apple in house 300p
orange in school 200p
So I matched (.+)([\d]+p)(.+)$ and substituted with \1 \3 \2.
But the result is like
30 apple in house 0p
orange 20 in school 0p
I also checked greedy concept, but I don't know what is problem. How can I fix this?