Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
down vote favorite


I am having text file from which i want to find out the marks value which is 65 in the current text.

I need expression to find out the marks from each file which comes after My Marks statement. The number of lines in the code are not specified or fixed it may be 2 or more.

I don't have any idea how to get values including newline using regular expressions.I am new to regular expression so please help me.

Thanks in advance.

XML
<FONT STYLE="font-family:ARIAL" SIZE="2">My Marks</FONT></P></TD>
<TD ALIGN="bottom"><FONT SIZE="1">&nbsp;</FONT></TD>
<TD ALIGN="top"><FONT STYLE="font-family:ARIAL" SIZE="2">&nbsp;</FONT></TD>
<TD ALIGN="top" ALIGN="right"><FONT STYLE="font-family:ARIAL" SIZE="2">65</FONT></TD>
Posted

1 solution

Regular Expressions are not really what you are after as they are not particularly fit for this purpose. Please consider using the HtmlAgilityPack [^]. For an example you can use this post on StackOverflow: How to use HTML Agility Pack[^]. The syntax to select content is analogous to XPath[^] expressions.

Best Regards,

—MRB
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900