Re: Perl5 and Alternate strange behavior
"Daniel F. Savarese" <[email protected]> Thu, 14 Nov 2002 20:00:11 -0500
| Newsgroups | gmane.comp.jakarta.oro.user |
|---|---|
| Message-ID | <[email protected]> |
In message <[email protected]>, "Jero me Jacobsen" writes: >Is there a way ORO to do this? Or is there a way to specify this in the >pattern itself? The normal way to do this in Perl is to use ^ and $ to denote the start and end of the match (i.e., you "specify this in the pattern itself"): $foo =~ /^(?:|STUFF|JUNK)$/ so I believe what you want is: Pattern pattern = compiler.compile("^(?:|STUFF|JUNK)$"); daniel