#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2012
    Posts
    2
    Rep Power
    0

    Regex to deny sentence


    Hi guys,

    I need to find any URL (in red) inside this sentence:

    <link rel="image_src" href="any URL"

    But it cannot be at any circunstante this one:

    <link rel="image_src" href="http://s1. trrsf. com .br/atm/3/core/_img/terra-logo-white-bg-v2 .jpg"

    I'm using this regex but it finds everything:

    <link rel="image_src" href="([^\"]+)"

    Any advice?
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2012
    Posts
    2
    Rep Power
    0
    Originally Posted by magaupe123
    Hi guys,

    I need to find any URL (in red) inside this sentence:

    <link rel="image_src" href="any URL"

    But it cannot be at any circunstante this one:

    <link rel="image_src" href="http://s1. trrsf. com .br/atm/3/core/_img/terra-logo-white-bg-v2 .jpg"

    I'm using this regex but it finds everything:

    <link rel="image_src" href="([^\"]+)"

    Any advice?
    anyone?
  4. #3
  5. Jealous Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,303
    Rep Power
    9400

IMN logo majestic logo threadwatch logo seochat tools logo