Q: How can you use a regular expression to search backwards?

  • Thread starter Thread starter Mark Davies
  • Start date Start date
M

Mark Davies

Any ideas would be much appreciated.

I've been hunting for over an hour now and am starting to wonder
whether the v2.0 .NET framework can't do this.
 
lol, I think I was being a bit thick. I worked it out by playing with
the code. The Regex constructor has an optional RegexOptions parameter
where you can specify a right to left search, like this:

r = new Regex(@"<", RegexOptions.RightToLeft);
 
Back
Top