Results 1 to 2 of 2

Thread: [RESOLVED] [2008] Again a Problem with RegEx

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 2008
    Posts
    202

    Resolved [RESOLVED] [2008] Again a Problem with RegEx

    This is the Sites Code:

    Code:
    <A HREF="/?id=64072">This is The Text that i want</A></P>
    <A HREF="/?id=65850">This is The Text that i want 2</A></P>
    <A HREF="/?id=65967">This is The Text that i want 3</A></P>
    And this is my RegEx but it doesent get: This is the Text

    Code:
    "(?<=\<A\sHREF=""/?id=[a-zA-Z0-9_/\.\-]*""\>).+(?=\</A\>)"
    Hope somebody can help me...

  2. #2
    Code Monkey wild_bill's Avatar
    Join Date
    Mar 2005
    Location
    Montana
    Posts
    2,993

    Re: [2008] Again a Problem with RegEx

    I think you've got too many escape characters, when questionable you can use regex.escape to find out what needs to be escaped:
    Code:
    Dim expression As New Regex("(?<=<A\ HREF=""/\?id=[a-zA-Z0-9_/\.\-]*"">).+(?=</A>)")
    That is the very essence of human beings and our very unique capability to perform complex reasoning and actually use our perception to further our understanding of things. We like to solve problems. -Kleinma

    Does your code in post #46 look like my code in #45? No, it doesn't. Therefore, wrong is how it looks. - jmcilhinney

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width