in reply to Cantor's Revenge Matching
It seems odd to me that ÑÑ =~ Ñ. would match but Ñ. =~ ÑÑ would not. Here's and even simpler version that shows that Ñ =~ . matches and . =~ Ñ does not.
. matches any character (except \n by default) so m/Ñ./ matches a Ñ followed by any character, which ÑÑ is. m/ÑÑ/ matches only ÑÑ, which Ñ. is not. The difference is that in a regex, . has special meaning, while in a string, it doesn't.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Cantor's Revenge Matching
by terrencebrown (Acolyte) on May 01, 2003 at 17:22 UTC | |
by Paladin (Vicar) on May 01, 2003 at 17:41 UTC |