查看: 779|回复: 4
打印 上一主题 下一主题

[求助] 求助!关于正则表达式

[复制链接]

该用户从未签到

7

主题

818

回帖

1万

积分

状元

Rank: 9Rank: 9Rank: 9

积分
12678

灌水大神章小蜜蜂章笑傲江湖章

跳转到指定楼层
1
发表于 2012-6-6 12:02:02 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
[i=s] 本帖最后由 mitkyg 于 2012-6-6 12:16 编辑 [/i]

gap, noun, verb, gapped, gapping.
noun 1. a broken place; opening.
△Ex. The cows got out of the field through a gap in the fence.
(SYN) break, breach.
2. an empty part; unfilled space; blank.
△Ex. The record is not complete; there are several gaps in it. There still exists in general a wide gap between the empirical facts of chemistry on the one side, and the fundamental laws of physics on the other (Science News).
(SYN) lacuna.
3. a wide difference of opinion, character, or the like.
(SYN) divergence.

问题:我想把以“△Ex.”开头的例句替换成[*]•[i] The cows got out of the field through a gap in the fence.[/i][/*]                                      [*]•[i] The record is not complete; there are several gaps in it. There still exists in general a wide gap between the empirical facts of chemistry on the one side, and the fundamental laws of physics on the other (Science News).[/i][/*]

怎样替换????求指教!

该用户从未签到

7

主题

818

回帖

1万

积分

状元

Rank: 9Rank: 9Rank: 9

积分
12678

灌水大神章小蜜蜂章笑傲江湖章

2
 楼主| 发表于 2012-6-6 12:17:40 | 只看该作者
{:soso_e100:}高手帮帮忙吧。。。。。

该用户从未签到

7

主题

818

回帖

1万

积分

状元

Rank: 9Rank: 9Rank: 9

积分
12678

灌水大神章小蜜蜂章笑傲江湖章

3
 楼主| 发表于 2012-6-6 19:17:23 | 只看该作者
顶上去。。。高手帮帮忙吧。。。。。

该用户从未签到

4

主题

117

回帖

3254

积分

贡士

Rank: 6Rank: 6

积分
3254

灌水大神章小蜜蜂章笑傲江湖章

4
发表于 2012-6-7 00:01:26 | 只看该作者
本帖最后由 viarm 于 2012-6-7 00:03 编辑

-By means of Vim, please ignore this post if not.
  1. :g#\M△Ex.#s#$#[/*]#g
  2. :%s#\M△Ex.#[*]•[i]#g
复制代码

-Be careful and please make the above commands tested at first because all of the results are subject to the sources.

该用户从未签到

7

主题

818

回帖

1万

积分

状元

Rank: 9Rank: 9Rank: 9

积分
12678

灌水大神章小蜜蜂章笑傲江湖章

5
 楼主| 发表于 2012-6-7 09:42:12 | 只看该作者
4# viarm
灰常感谢。。。。。已测试成功。。