Click here to Skip to main content
15,902,810 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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?
Posted

1 solution

^[^$]*\$[^$]*$

With the MultiLine option seems to work.

Get http://www.ultrapico.com/Expresso.htm[^]

Or try My version: RegexTester[^]
 
Share this answer
 
v2
Comments
Member 11136799 4-Dec-14 23:59pm    
Thank you very much.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900