On Tue, Jan 07, 2003 at 10:55:54AM -0600, will trillich wrote:
[...]
> slight rewording needed -- "black" comes back as true BECAUSE IT
> DOESN'T MATCH, and that's what you're looking for with !~. it
> might seem like a small distinction until you realize how easy
> it is to be misled! :)
Right, so
On Mon, Jan 06, 2003 at 11:40:08PM -0200, andrej hocevar wrote:
> I've been playing around with these two REs in Perl with no
> success. Can anyone tell me what's wrong?
>
> This works:
> !~ /^(?:red|blue)$/
$var !~ // ==> var as no match for expression
/^$/ ==> match expression
On Mon, Jan 06, 2003 at 11:40:08PM -0200, andrej hocevar wrote:
> I've been playing around with these two REs in Perl with no
> success. Can anyone tell me what's wrong?
Derrick has nailed it, I believe, so I won't go over that again.
> which fails. Why is this? Is there no way of saying "neither
On Mon, Jan 06, 2003 at 11:40:08PM -0200, andrej hocevar wrote:
| Hello.
| I've been playing around with these two REs in Perl with no
| success. Can anyone tell me what's wrong?
Disclaimer:
I assume !~ means "does not match".
(I don't do perl)
(However, I know that =~ means "matches")
Hello.
I've been playing around with these two REs in Perl with no
success. Can anyone tell me what's wrong?
This works:
!~ /^(?:red|blue)$/
and will match everything except any of the two fixed strings
"red" or "blue" or any combination thereof. "black" matches,
as does "blu", because it's neith
5 matches
Mail list logo