Connecting Tech Pros Worldwide Forums | Help | Site Map

Regex question

pedrito
Guest
 
Posts: n/a
#1: Aug 30 '07
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
Guest
 
Posts: n/a
#2: Aug 30 '07

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-dnaA86bJWJEvbnZ2dnUVZ_oGjnZ2d@giganews.com...
Quote:
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.
>

Closed Thread


Similar C# / C Sharp bytes