> 
> If you want to avoid the verbosity of AppleScript, this text filter will do 
> what you want:
> 
> #/usr/bin/perl
> while (<>){
>  s~\b(\w{1,5}|\w{7,})\b~\U$&~g;
>  print;
> }
> 
> or
> 
> #!perl -p
> s~\b(\w{1,5}|\w{7,})\b~\U$&~g;
> 
> 
> Otherwise in the substitution expression s~find~replace~ you need to change 
> Perl's '$&' to BBEdit's (PCRE's) '\0'
> 
> This will change all words in the document (or selection) not 6 characters 
> long to upper case.
> 
> JD



> 
> Here's a way to do it with a negative-lookahead assertion:
> 
> ^(?!\w{6}$)\w+$
> 
> By caret, I assume you mean a negated character class [^...].  A character
> class always matches or rejects exactly one character, so it doesn't apply
> here.
> 
> Ronald


Thanks to John and Roland.
I greatly appreciate this BBEdit group, and how it comes up with alternative 
solutions. It's fun, inspiring, and most of all, useful!

Cheers
Tor Rafsol Løseth
Bergen, Norway

-- 
You received this message because you are subscribed to the 
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
<http://groups.google.com/group/bbedit?hl=en>
If you have a feature request or would like to report a problem, 
please email "[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

Reply via email to