I am using System.Text.RegularExpressions. I'm looking for a regular expression that will match the end of a document. These documents end with a string on its own line that looks like:
PAGE 1 of 1
PAGE 2 of 2
PAGE 3 of 3
...
I don't want the expression to match "PAGE 1 of 3" or other strings where the two numbers don't match. I realize that I can just recognize the string and then use an outside method to evaluate the two numbers inside and determine if I want to use that match. @"(?<=PAGE\x20\d*of\x20\d*") - I'm using a look behind because I'm splitting the document after the match.
Is there a way just using regular expressions to do this?