Triming a text selection front and back
I'd like to trim everything at the front and rear of a text selection, that is not:
1. alphanumeric characters
2. () [] {} <>
3. ending punctuation marks such as . ! ? : ;
FYI, a selection can have multiple carriage returns at the end of the selection. I'd like to get rid all but one of them as well.
Could it be done using macros?
|