A paragraph of text has numbers and alphabetic letters mixed. Your task is to separate the numbers to the left side and the alphabetic letters to the right side in the same order of each line.
Rules:
- Numbers are plain integers; so no decimal point, and no negative/positive signs.
- Numbers may or may not be contiguous, but whatever the case may be, they have to be pushed to left side in the same order.
- Numbers may occur in between words.
- The text contains only ASCII alphabetic letters and numbers, along with spaces, underscores, commas and dots.
- The one who does this with minimum keystrokes (like vim macros) or least amount of bytes in case of scripting is the winner.
Example Text:
A word can have any number of text like 433884,
but all the numb89ers has to be moved left side
but alph6abetical va9lues has to be pas46ted on right side.
The text might con4tain chara29cters s2huffled like hlep or dfeintino or even
meaningless1 words co43mbined togeth81er.
Expected output:
433884A word can have any number of text like ,
89but all the numbers has to be moved left side
6946but alphabetical values has to be pasted on right side.
4292The text might contain characters shuffled like hlep or dfeintino or even
14381meaningless words combined together.