Nice AppleScript solution. I won't say anything about Perl... :) But I  
will share my functional (newlisp) solution by way of saying thanks  
for the interesting and off-topic distraction...


(set 'common-words '("it" "a" "the" "this" "that" "you" "when" "is"  
"may" "be" "if" "and"))

(define (remove-common text)
      (difference (find-all {[a-zA-Z]+} (lower-case text)) common- 
words))

(define (compare text1 text2)
      (< (remove-common text1) (remove-common text2)))

(join (sort (parse text-file "%") compare) "%") ; re-assemble


There's no need to edit the original lines - the sort function can  
compare significant extracts from each line without doing any  
permanent editing...



--~--~---------~--~----~------------~-------~--~----~
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.
-~----------~----~----~----~------~----~------~--~---

Reply via email to