Regex question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • pedrito

    #1

    Regex question

    Sorry if this is a repost. According to Outlook Express, I posted this
    yesterday but it's not showing for me and I can't find it on Google Groups,
    so I'm assuming it didn't go through for some reason. If it did and this is
    a dupe, I apologize....

    I have a regex question and it never occurred to me to ask here, until I saw
    Jesse Houwing's quick response to Phil for his Regex question.

    I have some filenames that I'm trying to parse out of URLs.

    (href=("|')http ://.www\.thesite\. com/.{1,7}/)(?<filename>.[^"|'])

    This generally works, but the problem is some of the image files have
    ..th.jpg at the end to indicate thumbnails. I want to exclude those. I just
    want the ones that don't have .th. before the file extension.

    I've tried using forward and reverse negative lookups, but I guess I'm not
    using them correctly. Any help on how to get a non-match for a .th. would be
    great.


  • pedrito

    #2
    Re: Regex question

    Oops

    Okay, I see what happened here. Outlook express grouped my question with
    another of the same topic, for some reason.. Sorry about the repost.
    "pedrito" <pixbypedrito at yahoo.comwrote in message
    news:ld-dnaA86bJWJEvbnZ 2dnUVZ_oGjnZ2d@ giganews.com...
    Sorry if this is a repost. According to Outlook Express, I posted this
    yesterday but it's not showing for me and I can't find it on Google
    Groups, so I'm assuming it didn't go through for some reason. If it did
    and this is a dupe, I apologize....
    >
    I have a regex question and it never occurred to me to ask here, until I
    saw
    Jesse Houwing's quick response to Phil for his Regex question.
    >
    I have some filenames that I'm trying to parse out of URLs.
    >
    (href=("|')http ://.www\.thesite\. com/.{1,7}/)(?<filename>.[^"|'])
    >
    This generally works, but the problem is some of the image files have
    .th.jpg at the end to indicate thumbnails. I want to exclude those. I just
    want the ones that don't have .th. before the file extension.
    >
    I've tried using forward and reverse negative lookups, but I guess I'm not
    using them correctly. Any help on how to get a non-match for a .th. would
    be
    great.
    >

    Comment

    Working...