【发布时间】:2011-09-27 17:37:11
【问题描述】:
我想用 vim 从文本中提取一些数据.. 数据是这样的:
72" title="(168,72)" onmouseover="posizione('(168,72)');" onmouseout="posizione('(-,-)');">>
72" title="(180,72)" onmouseover="posizione('(180,72)');" onmouseout="posizione('(-,-)');">>
72" title="(192,72)" onmouseover="posizione('(192,72)');" onmouseout="posizione('(-,-)');">>
72" title="(204,72)" onmouseover="posizione('(204,72)');" onmouseout="posizione('(-,-)');">>
我需要提取的数据包含在:title="(168,72)"中。
特别是我有兴趣只提取这些坐标。
我虽然关于使用 vim 首先删除 title=" 之前的所有内容 .. 但我并不是真正的正则表达式大师 .. 所以我问你:如果有人有任何提示:请告诉我:)
【问题讨论】:
-
和其他贴的vim一样使用流式表达非常强大。这些流操纵器也可用于 whit sed(几乎与
:%相同)。如果您想了解有关这些表达式的更多信息,请查看此sed introduction。
标签: vim text extract text-extraction