I would like to be able to create a collection of nodes where the text starts with a word and then a number. For example, given the following:
<p>FINDTHIS 1</p>
<p>FINDTHIS SOMETEXT</p>
<p>FINDTHIS 2</p>
I would like to be able to create a collection consisting of two paragraph nodes: FINDTHIS 1 and FINDTHIS 2.
One possible approach would be to create an xpath query like //p[starts-with(., 'FINDTHIS ')]
and then use a regular expression to determine whether or not the next character is a number. If I wanted to obtain a list of matches that returned the above criteria, I could create a regular expression object and test the text for each member in the collection.
Is there a way to utilize a regular expression directly within the selector using HtmlAgilityPack?