By adding a ^ - anchor at beginning and $ anchor at end:
/^name$/ # must be name
/^name/ # must start with name
/name$/ # must end with name
Wags ;)
-----Original Message-----
From: HANSON [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 09, 2001 15:46
To: [EMAIL PROTECTED]
Subject: basic pattern matching
Hi gurus!
I am traversing a multidimensional hash searching for a value and
trying to delete it. However, I am ending up deleting the wrong one.
The value I'm looking for is /name/. There is also a value of /name1/
in the hash. When I use =~/name/ it deletes the name1 value somehow.
Is there a way I can be very specific and keep it from deleting the
name1 value?
Thanks!
-mark
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]