tommyw has asked for the wisdom of the Perl Monks concerning the following question:
Clearly,in the second line, the correct output is "yeshere". I have determined that "(.*?)\322", "[^\322]*" and ".*\322" all work (but the last obviously means something slightly different). Since we've got this problem in existing code, I'd rather find a patch, or a mechanism for finding the problem areas, rather than having to go through all of our code, checking by eye. Any ideas where to start?perl -w -e '$_="Hello there\n"; s/t/\322/; print $_; s/^.*?\322/yes/; +print $_' Hello ̉here Hello ̉here
Edit Masem 2001-09-14 - Code tags in examples
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: High bit bug in RE?
by japhy (Canon) on Sep 14, 2001 at 17:45 UTC | |
by tommyw (Hermit) on Sep 14, 2001 at 19:31 UTC | |
by japhy (Canon) on Sep 14, 2001 at 21:11 UTC | |
|
Re: High bit bug in RE?
by Zaxo (Archbishop) on Sep 14, 2001 at 13:01 UTC | |
by tommyw (Hermit) on Sep 14, 2001 at 13:16 UTC | |
by japhy (Canon) on Sep 14, 2001 at 17:24 UTC |