I
I
Igor2013-12-18 06:15:26
Regular Expressions
Igor, 2013-12-18 06:15:26

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

1 answer(s)
A
Anton Martsen, 2013-12-18
@ReLogan

//-style comments only:
All comments:
Finding Comments in Source Code Using Regular Express...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question