You are viewing a plain text version of this content. The canonical link for it is here.
Posted to regexp-user@jakarta.apache.org by Matthias Gärtner <g...@rtner.de> on 2001/11/24 23:46:31 UTC
Why does this RE matches? Am I missing something?
Hello,
I added this test to the RETest.txt file. RE says that the
expression DOES match. Is this to be expected? I don't think so....
#149
^(abc)|(def)$
abcdef
NO
(jakarta-regexp-1.2)
Regards,
Matthias
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Why does this RE matches? Am I missing something?
Posted by Erik Hollensbe <be...@isle.yi.org>.
On Sat, Nov 24, 2001 at 08:42:47PM -0600, Dave Bender wrote:
> I'm a rookie with regular expressions, but isn't it asking: "match on starts
> with 'abc' or ends with def"
>
> both of those are true so it seems to me like it would match. Why wouldn't
> it?
That is correct, to match what I think the original poster suggested would be:
^(abc|def)$
>
>
>
> -----Original Message-----
> From: Matthias Gartner [mailto:g@rtner.de]
> Sent: Saturday, November 24, 2001 4:47 PM
> To: regexp-user@jakarta.apache.org
> Subject: Why does this RE matches? Am I missing something?
>
>
> Hello,
>
> I added this test to the RETest.txt file. RE says that the
> expression DOES match. Is this to be expected? I don't think so....
>
> #149
> ^(abc)|(def)$
> abcdef
> NO
>
>
> (jakarta-regexp-1.2)
> Regards,
> Matthias
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: Why does this RE matches? Am I missing something?
Posted by Dave Bender <da...@benders-of-edina.com>.
I'm a rookie with regular expressions, but isn't it asking: "match on starts
with 'abc' or ends with def"
both of those are true so it seems to me like it would match. Why wouldn't
it?
-----Original Message-----
From: Matthias Gartner [mailto:g@rtner.de]
Sent: Saturday, November 24, 2001 4:47 PM
To: regexp-user@jakarta.apache.org
Subject: Why does this RE matches? Am I missing something?
Hello,
I added this test to the RETest.txt file. RE says that the
expression DOES match. Is this to be expected? I don't think so....
#149
^(abc)|(def)$
abcdef
NO
(jakarta-regexp-1.2)
Regards,
Matthias
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>