Regex.Match

Hey guys i want to do a match to return my title="TEXT" using regex match

my current regex serach for <Title>TEXT</Ttle>

here the code:

 Match TitleMatch = Regex.Match(fileContents, "<title>([^<]*)</title>", RegexOptions.IgnoreCase | RegexOptions.Multiline);

now i need to change to find the inner text of Title="TEXT"

couse this is aspx page not htlm
JCWEBHOSTAsked:
Who is Participating?
 
Marco GasiConnect With a Mentor FreelancerCommented:
Try this

Match TitleMatch = Regex.Match(fileContents, "(?<=title=\")[^\"]*", RegexOptions.IgnoreCase | RegexOptions.Multiline);
0
 
guveraCommented:
Hi,
 
Please check the below links.

  http://forums.asp.net/t/1269203.aspx/1
  http://www.dotnetperls.com/regex-match
  http://www.codeproject.com/KB/dotnet/regextutorial.aspx

Hope it may helpful to you.

Regards
Guvera
0
 
käµfm³d 👽Commented:
What do you mean by, "now i need to change to find the inner text of Title='TEXT'"?
0
 
dimajCommented:
Can't you use XML libraries to extract all the elements?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.