I am in TextWrangler, trying to grep for all sets of more than one consecutive space. I want to replace all these instances of multiple spaces with a single space. E.g.,
Find "Cognitive Impenetrability of Visual Perception" Replace with "Cognitive Impenetrability of Visual Perception"
I've checked all the recommended threads on this and none of them are working for me.
- "Regex to replace multiple spaces with a single space"
- "How to replace multiple white spaces with one white space"
- "replacing spaces with just one “_”"
Any advice on how to search (or Grep) for multiple spaces is welcome.
In TextWrangler
From menu
Search
go selectFind...
to get to the Find & Replace box.In
Find
you type: "*
" (i.e. two spaces followed by *)In
Replace
you type "" (one space)
Don't forget to select box
grep
, and then pressReplace all
.