Got more questions? Find advice on: ASP | SQL | XML | Windows
Welcome to RegexAdvice Sign in | Join | Help

Help with new line

  •  08-09-2007, 5:11 AM

    Help with new line

    hey all

    i am trying to get the input tags that their type=text from a source code of a page.

    i was using this :

     (<input[^\>]+?type=['|"]?text['|"]?[^>]*?name=['|"]?(?<name>[^\s|'|"]*)['|"]?.*?>)
    |
    (<input[^\>]+?name=['|"]?(?<name>[^\s|'|"]*)['|"]?[^>]*?type=['|"]?text['|"]?.*?>)

    but when i found a source code that the input tag is spread out over 3-4 lines like so :

    <input type="text" name="typeA"

    value=""

                onclick="Gohere();"

                    />

     

    all i want is to get the input tag from < to > and the problem as u can see is the new lines which i dono how many will be on the page

    i am using C# regex in .Net inviorment

    thanks .

     

    Filed under: , , ,
View Complete Thread