一段文字混合了数字和字母。您的任务是按照每行的相同顺序将数字左侧和右侧的字母分开。
规则:
- 数字是纯整数;因此没有小数点,也没有负/正号。
- 数字可能是连续的,也可能不是连续的,但是无论如何,它们都必须以相同的顺序推到左侧。
- 单词之间可能出现数字。
- 文本仅包含ASCII字母和数字,以及空格,下划线,逗号和点。
- 用最少的按键操作(如vim宏)或最少的字节数(在编写脚本的情况下)执行此操作的人就是赢家。
示例文字:
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.
预期产量:
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.