0

You can do this in Perl/Java ( example )

Is it possible to do this in c#?

Community
  • 1
  • 1
Dmytro Laptin
  • 601
  • 8
  • 14

1 Answers1

3

Yes, you can do that in C#. It's called a positive lookahead assertion. See this table for a comparison of the capabilities of various regular expression engines (search for lookaround on that page).

On a related note, C# also supports variable width lookbehind assertions - something that most other engines do not support.

Mark Byers
  • 811,555
  • 193
  • 1,581
  • 1,452