Aaron Sherman wrote: > 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 ;-)
The regex counterpart of C< say "$x" > vs. C< print "$x\n" >. Yes, this would indeed solve a lot of problems. It also reflects a tendency in some regular expression engines out there to automatically impose full string matching (i.e., an implicit ^ at the start and $ at the end). That said: for mnemonic purposes, I'd be inclined to have :f do /^[<$pattern>]$/, while :ff does /^^[<$pattern>]$$/. -- Jonathan "Dataweaver" Lang