Answer the question
In order to leave comments, you need to log in
How to find occurrences from characters in C# using Regex?
You need to use Regex to find occurrences from the characters // to the end of the line. Regex comments = new Regex(@"\//([^}])$");
for some reason it doesn't work.
Answer the question
In order to leave comments, you need to log in
//-style comments only:
All comments:
Finding Comments in Source Code Using Regular Express...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question