Hello Christopher,

I think this AppleScript is in the ballpark.

-------------------------------------------------------------------------------------------
tell application "BBEdit"
  tell text of front text window
    replace "^(.+)[[:punct:]]+$" using "\\1" options {search mode:grep, case 
sensitive:false, starting at top:true}
    replace "^[[:blank:]]*\\r{2,}" using "\\r" options {search mode:grep, case 
sensitive:false, starting at top:true}
    replace "[[:blank:]]+" using "\\r" options {search mode:grep, case 
sensitive:false, starting at top:true}
    process duplicate lines duplicates options {match mode:leaving_one, 
matching case sensitive:true} ¬
      output options {deleting duplicates:true}
  end tell
end tell
-------------------------------------------------------------------------------------------

--
Best Regards,
Chris

-- 
This is the BBEdit Talk public discussion group. 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>

--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].

Reply via email to