Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

8
  • Ahh... [] makes it "optional". That explains it. Commented Aug 19, 2011 at 15:28
  • 7
    @WernerCD, no * makes it "optional". [ ] just makes a list of characters with only one character in it (a space). It is the quantifier * that means "zero or more of the previous thing" Commented Aug 19, 2011 at 15:33
  • Ahh... so to be more accurate, changing it from a single space / */, to a double space is what did it then. I gottcha. Commented Aug 19, 2011 at 15:50
  • I was trying to search for a pattern which search only double spaces only and it worked cool Commented Jan 19, 2015 at 8:18
  • For some reason i got order s uncompleted with sed, while tr -s " " worked. I'll not forget it never :-B because is SO handy. The simpler the better. Commented Mar 31, 2018 at 15:01