Regular Expressions to Match a Pattern 
Author Message
 Regular Expressions to Match a Pattern

Someone here gave me the idea to use Regular Expressions
to find emails in a text file.  I pulled this off of the
microsoft help..


<host>.+)")

It seems to match too much.

Example


Comes up with

Match (0) Group(0) is 'Message-ID:


Match (0) Group(1) is 'Message-ID: <WySvX5w0Y0000108c'
Match (0) Group(2) is 'naexeast.ad.rag-american.com>

All I want it one match. Like this.....


There doesn't seem to be a whole lot of good examples out
there on this.



Sun, 27 Feb 2005 00:02:44 GMT  
 Regular Expressions to Match a Pattern
Looks like I got it...


Seems to work fine...

Quote:
>-----Original Message-----
>Someone here gave me the idea to use Regular Expressions
>to find emails in a text file.  I pulled this off of the
>microsoft help..


><host>.+)")

>It seems to match too much.

>Example


>Comes up with

>Match (0) Group(0) is 'Message-ID:


>Match (0) Group(1) is 'Message-ID: <WySvX5w0Y0000108c'
>Match (0) Group(2) is 'naexeast.ad.rag-american.com>

>All I want it one match. Like this.....


>There doesn't seem to be a whole lot of good examples out
>there on this.

>.



Sun, 27 Feb 2005 00:16:21 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Regular expressions and/or pattern matching in VBA?

2. Regular Expressions Repace Pattern

3. needed: regular expression pattern

4. regular expression pattern

5. Regular Expression Pattern with Smart Quotes

6. Repetitive pattern devided by space in regular expression

7. HELP - adv. regular expression - pattern

8. This regular expression pattern should be easy

9. Regular Expression, ORing the patterns.

10. Regular Expression -Pattern Operator

11. Regular expression pattern

12. needed: regular expression pattern...

 

 
Powered by phpBB® Forum Software