Removing spaces at end of sentence

753 views
Skip to first unread message

Phatcorns

unread,
Oct 10, 2008, 10:07:48 AM10/10/08
to TextWrangler Talk
Hi, I'm trying to remove all extra spaces at the end of my sentences.
Is there any way to do this? Here is a sample of the text.

00:00:26:15,00:00:28:01,Well, let's try our best.
00:00:28:05,00:00:29:18,You too, Miyamoto-kun.
00:00:37:17,00:00:38:20,If...

The first two sentences both have spaces after the period and they are
unnecessary. Is there any way to delete them all at once?

Thanks for any help!

Tom Robinson

unread,
Oct 10, 2008, 6:41:20 PM10/10/08
to textwr...@googlegroups.com
On 2008-10-11, at 03:07, Phatcorns wrote:

> Hi, I'm trying to remove all extra spaces at the end of my sentences.
> Is there any way to do this?

The basic way is to do a find & replace and replace a space followed
by carriage return with a carriage return. To enter a carriage return
in the find & replace dialog press command-return.

You can also get fancy with grep and search for ' +$' (without the
quotes) and replace with nothing. The space searches for a space, the
plus sign says 'one or more', the $ anchors the string to the end of a
line.

Cheers

Reply all
Reply to author
Forward
0 new messages