Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > regex

Reply
Thread Tools

regex

 
 
Michael G
Guest
Posts: n/a
 
      01-26-2004
I want to match (E-Mail Removed)......gif in a string that contains many
similar patterns.

I used "mailto.[^"]*)" to match each "mailto: ..." string. The parans
then allowed me to get at the email address.

But now I realize I need more info from each match.
I need to extend the match to the first 'gif' (the characters 'gif' would be
the end of the string instead of ' " ' as in my first regex.) but I am
having some trouble doing so.

I have tried a number of different combinations but without the match I
need.

I know what I need. I need to do as I did in the example above except I
need to not include a group of characters instead of just one.

Thanks, Mike




-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----




-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
 
Reply With Quote
 
 
 
 
Michael G
Guest
Posts: n/a
 
      01-26-2004

"Michael G" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I want to match (E-Mail Removed)......gif in a string that contains

many
> similar patterns.
>
> I used "mailto.[^"]*)" to match each "mailto: ..." string. The parans
> then allowed me to get at the email address.
>
> But now I realize I need more info from each match.
> I need to extend the match to the first 'gif' (the characters 'gif' would

be
> the end of the string instead of ' " ' as in my first regex.) but I am
> having some trouble doing so.
>
> I have tried a number of different combinations but without the match I
> need.
>
> I know what I need. I need to do as I did in the example above except I
> need to not include a group of characters instead of just one.
>
> Thanks, Mike
>


this works

"mailto.[^"]*)".*gif"{1}




-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
 
Reply With Quote
 
 
 
 
Michael G
Guest
Posts: n/a
 
      01-29-2004
no regex experts?
I am surprised that no one responded. I did finally figure it out.

/"mailto.[^"]*)".*?gif/i



"Michael G" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I want to match (E-Mail Removed)......gif in a string that contains

many
> similar patterns.
>
> I used "mailto.[^"]*)" to match each "mailto: ..." string. The parans
> then allowed me to get at the email address.
>
> But now I realize I need more info from each match.
> I need to extend the match to the first 'gif' (the characters 'gif' would

be
> the end of the string instead of ' " ' as in my first regex.) but I am
> having some trouble doing so.
>
> I have tried a number of different combinations but without the match I
> need.
>
> I know what I need. I need to do as I did in the example above except I
> need to not include a group of characters instead of just one.
>
> Thanks, Mike
>
>
>
>
> -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
> http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
> -----== Over 100,000 Newsgroups - 19 Different Servers! =-----
>
>
>
>
> -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
> http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
> -----== Over 100,000 Newsgroups - 19 Different Servers! =-----





-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How make regex that means "contains regex#1 but NOT regex#2" ?? seberino@spawar.navy.mil Python 3 07-01-2008 03:06 PM
String Pattern Matching: regex and Python regex documentation Xah Lee Java 1 09-22-2006 07:11 PM
Is ASP Validator Regex Engine Same As VS2003 Find Regex Engine? =?Utf-8?B?SmViQnVzaGVsbA==?= ASP .Net 2 10-22-2005 02:43 PM
Java regex imposture re: Perl regex compatibility a_c_Attlee@yahoo.com Java 2 05-06-2005 12:16 AM
perl regex to java regex Rick Venter Java 5 11-06-2003 10:55 AM



Advertisments