c# - Regex: Find pagenumber from partial matching urls -
As we all know, the razax patterns are the first time you see them in your stomach (or the 10th time you have ever seen Also did not go before head and actually learned it. Quilty.) I am currently reading this, but since I am on a strict time limit, I check here if I can get a faster and better answer / lecture.
I have a forum thread, and I want to scan through HTML and find the last page of the thread.
Say that I have one of these URLs that recognizes the thread in question:
- * (full URL of thread)
- < Em>
And I want to get all the values (integer) which appear directly after the above (next path) Html - "partial" match in the document.
Therefore anywhere from any of the following holes (the doctor is shown as a string):
I want to remove 34 numbers (only 34), so I can parse it int.
Edit
OK, to make it easy:
Say that I html string all numbers x which is my inputstring / forum / thread-93912 Afterwards appear.
All of these appear in the html string , and I want to remove the numbers:
- thread-93912 / 34 < / Strong
- thread-93912 / 14
- thread-93912 / 84
- threads-93912 Text "itemprop =" text ">
You do not need regex. Just use
uri = new urai ("your url here"); Console.WriteLine (url.Segments [4]);
Comments
Post a Comment