Posted on 2011-10-12
Last Modified: 2012-05-12
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
Question by:JCWEBHOST
    LVL 8

    Expert Comment

    Please check the below links.

    Hope it may helpful to you.

    LVL 30

    Accepted Solution

    Try this

    Match TitleMatch = Regex.Match(fileContents, "(?<=title=\")[^\"]*", RegexOptions.IgnoreCase | RegexOptions.Multiline);
    LVL 74

    Expert Comment

    by:käµfm³d 👽
    What do you mean by, "now i need to change to find the inner text of Title='TEXT'"?
    LVL 7

    Expert Comment

    Can't you use XML libraries to extract all the elements?

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
    User art_snob ( encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
    Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
    Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now