On Thu, Aug 5, 2010 at 7:55 AM, Carl Mäsak <cma...@gmail.com> wrote:
> Darren (>>>>), Carl (>>>), Darren (>>), Patrick (>): > > > In this case yes -- the original pattern without the square brackets > > would act like: > > > > / [^ <[A..Z]>+] | [<[a..z]>+ $] / > > > > In other words, the original pattern says "starting with uppercase > > or ending with lowercase". > > I see this particular thinko a lot, though. Maybe some Perl 6 lint > tool or another will detect when you have a regex containing ^ at its > start, $ at the end, | somewhere in the middle, and no [] to > disambiguate. > > You know, this problem would go away, almost entirely, if we had a :f[ull] adverb for regex matching that imposed ^[...]$ around the entire match. Then your code becomes: m:f/<[A..Z]>+|<[a..z]>+/ for grins, :f[ull]l[ine] could use ^^ and $$. I suspect :full would almost always be associated with TOP, in fact. Boy am I tired of typing ^ and $ in TOP ;-) -- Aaron Sherman Email or GTalk: a...@ajs.com http://www.ajs.com/~ajs