From: Mike Stok Date: 2006-04-23T02:40:17+09:00 Subject: Re: Text Munger (#76) On 22-Apr-06, at 1:35 PM, PerlyGates wrote: > Alex Barrett wrote: >> Use negated word boundaries (\B) instead of the lookarounds to lose a >> few >> characters. Doesn't \B bring back the problems with _ ? Mike > > Thanks. And character twiddling rather than sort: > > perl -pe 's/\B([a-z])([a-z])\B/rand>.5?$1.$2:$2.$1/egi' > > -- > Posted via http://www.ruby-forum.com/. > > -- Mike Stok http://www.stok.ca/~mike/ The "`Stok' disclaimers" apply.