【发布时间】:2013-05-21 14:24:33
【问题描述】:
我有一个大文件,每个括号内都有内容。这不在行首。
1. Atmos-phere (7800)
2. Atmospheric composition (90100)
3.Air quality (10110)
4. Atmospheric chemistry and composition (889s120)
5.Atmospheric particulates (10678130)
我需要做以下事情
替换整个内容,去掉行号
1.Atmosphere (10000)改为纯Atmosphere同时删除行号
1.Atmosphere (10000)到普通的Atmosphere将其设为超链接
1.Atmosphere (10000)到普通的<a href="http://blahqd.com/Atmosphere.htm">linky study</a>-
[我添加/编辑] 将单词提取到一个新文件中,在其中我们得到一个简单的关键词列表。能否请您解释一下替换 \1\2 中的数字,并在某些字符上转义
每组关键词都是一个新行
AtmosphericAtmospheric compositionAir quality每个集合都是一行,由一个空格和逗号分隔
Atmospheric, Atmospheric composition, Air quality
我尝试像这样使用正则表达式查找,\(*\) 它找到了括号,但不知道如何替换它,以及在哪里放置替换,以及哪个变量保存替换值。
【问题讨论】:
-
创建一个新问题可能比在原始问题上添加更多内容更好。