查找使用正则表达式只有一个$符号的注释行? [英] Find a comment line which have only one $ symbol using regex?

查看:63
本文介绍了查找使用正则表达式只有一个$符号的注释行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有更多评论行的文件。

有些评论行有单个符号。

如何找到该行?

< br $>


Ex,

1.%\documentclass {acm_proc_article-sp}

2.%\fntext [labelHS] {PhD}

3.%Multi-DBSCAN使用异常值检测算法为每个密度分布选择最佳的$ \ _sepilon $

4.%及其值被限制为:$ \ alpha> 1 $

5。 %\ REQUIRE mcd $列表:迷你核心距离列表

6.%\ REQUIRE $ cmc $列表:核心迷你集群

7。 %及其值被限制为:$ \ alpha> 1





i想要一个正则表达式选择仅限单身$的评论专线。

正则表达式选择5和7行。



任何人都可以帮助我吗?

I have file with more comment lines.
Some comment lines have single $ symbol.
How to find that line?


Ex,
1. %\documentclass{acm_proc_article-sp}
2. %\fntext[labelHS]{PhD}
3. %Multi-DBSCAN chooses the best $\epsilon$ for each density distribution using an outlier detection algorithm
4. % and its value is constrained as: $\alpha>1$
5. % \REQUIRE List of mcd$:list of mini core distance
6. % \REQUIRE List of $cmc$: core mini cluster
7. % and its value is constrained as: $\alpha>1


i want a regex that choose a comment line with Single $ only.
That Regex Select 5 and 7 line.

Could anyone help me?

推荐答案

符号。

怎么找到那条线?





Ex,

1.%\documentclass {acm_proc_article-sp}

2.%\fntext [labelHS] {PhD}

3.%Multi-DBSCAN使用离群值检测算法为每个密度分布选择最佳的
symbol.
How to find that line?


Ex,
1. %\documentclass{acm_proc_article-sp}
2. %\fntext[labelHS]{PhD}
3. %Multi-DBSCAN chooses the best


\ _epsilon
\epsilon




4.%及其值被限制为:
for each density distribution using an outlier detection algorithm
4. % and its value is constrained as:


这篇关于查找使用正则表达式只有一个$符号的注释行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆