【发布时间】:2014-12-04 01:41:18
【问题描述】:
我有一个包含很多行的文件
http://example.com/part-1 this number 1 one
http://example.com/part--2 this is number 21 two
http://example.com/part10 this is an number 12 ten
http://example.com/part-num-11 this is an axample number 212 eleven
如何删除第一列和“数字 x”之间的“数字 x”+ 之后的所有字符...我想要这样的输出
http://example.com/part-1 1
http://example.com/part--2 21
http://example.com/part10 12
http://example.com/part-num-11 212
另一种情况: 输入:
http://server1.example.com/00/part-1 this number 1 one
http://server2.example.com/1a/part--2 this is section 21 two two
http://server3.example.com/2014/5/part10 this is an Part 12 ten ten ten
http://server5.example.com/2014/7/part-num-11 this is an PARt number 212 eleven
我想要相同的输出....而且数字总是在最后一个数字字段中
【问题讨论】: