Paragraphs < 3 characters

Can anybody tell me how i can find & replace paragraphs with only one, two or three characters? I’ve tried everything and it’s beginning to piss me off.

Replace paragraphs of fewer than three characters with… what? And in what application?

mgh

I want to do this only with AppleScript. I want to remove lines in a text file containing less than 3 characters. I know this can be done with BBedit but i prefer to build a standalone application.

This will replace the short paragraphs with something else:

And this one will simply remove the short paragraphs entirely:

Jon


[This script was automatically tagged for color coded syntax by Convert Script to Markup Code]

That did the job! Thanks a lot!

tell (a reference to my text item delimiters) 
     set {old_delim, contents} to {contents, return} 
     set {replace_paragraphs, contents} to {"" & replace_paragraphs, old_delim} 
end tell 


That is so slick! I’m always using text item delimiters but this conciseness (concision?) is beautiful (I’m sure this is old hat to everyone else) - think I’ll steal it. :stuck_out_tongue: