Re: Regular expressions
- From: Ron Rosenfeld <ronrosenfeld@xxxxxxxxxx>
- Date: Wed, 19 Sep 2007 21:05:41 -0400
On Wed, 19 Sep 2007 20:14:28 -0400, Ron Rosenfeld <ronrosenfeld@xxxxxxxxxx>
wrote:
On Wed, 19 Sep 2007 17:59:04 -0500, *** Kusleika <dkusleika@xxxxxxxxx> wrote:
On Wed, 19 Sep 2007 12:24:02 -0700, Dave <Dave@xxxxxxxxxxxxxxxxxxxxxxxxx>
wrote:
For example I could set a pattern of "[)(*&^]" how would I code it to
exclude those values?
.Pattern = "[^)(*&\^]"
Note the \ that precedes the second ^. The first ^ defines the character
sequence as negative and the \ escapes the second ^ so it's included in the
negative character sequence.
I don't believe there is any need to escape the ^ in VBScript. Both by
testing, and by documentation, it seems to be unnecessary.
http://msdn2.microsoft.com/en-us/library/ta6y6h4z.aspx
"If the caret character appears in any other position within the list, it
matches itself, that is, it has no special meaning. "
--ron
Of course, that only applies when the ^ appears within brackets as other than
the first character.
--ron
.
- References:
- Re: Regular expressions
- From: *** Kusleika
- Re: Regular expressions
- From: Ron Rosenfeld
- Re: Regular expressions
- Prev by Date: Default Formats
- Next by Date: Re: External Reference Data Updates.
- Previous by thread: Re: Regular expressions
- Next by thread: Re: Regular expressions
- Index(es):
Loading