I created a text file with some spaces, double spaces and triple spaces, and TextEdit found them all as I typed into the search field. I did notice that there was a second or two of time between me pressing the space bar and the spaces actually being found.I want to find all occurrences of ' ' (not counting the quotes) in a .txt file. Is this possible? When I type the 2 spaces into the "Find" area, it doesn't seem to find them. Thanks.
I'm at a loss, my copy of TextEdit.app doesn't act that way and I don't see anything in settings that would interfere with searching. Perhaps someone else can chime in with an answer.That works for me when I just type in 1 space as the target -- all the occurrences of one space turn white. (If there's more than one consecutive space, only the first space shows up white.) But if I continue my "Find" request by hitting spacebar again to type in a second space, TextEdit seems to revert to doing nothing -- nothing shows up in white. Any help much appreciated!
I'm no expert on text files, but could it be an issue with that file (tabs sometimes look like spaces)? Could I get a copy and test it here?Just to clarify -- Finding one space:
View attachment 634666
Daring to type spacebar a second time:
View attachment 634672
I haven't figured out how to get TextEdit.app to find tabs and new lines. This is why I use TextWrangler, you can find tabs with '\t' and new lines with '\n'. I wonder if TextWrangler would suit the OP's needs better than TextEdit.Is it possible that your sample does not have any double spaces? It appears to me that the places that might have double spaces have tabs instead.
DS
Thank you for supplying the file for me to test. @dsemf was right, the reason you cannot find any two or three consecutive spaces is because there aren't any. There are, however, lots of tabs. The only way to find a tab in TextEdit is to copy one to the clipboard and paste it into TextEdit's search box - TextEdit.app doesn't support searching for tabs with '\t'.The file is attached. artchoille50: Your theory sounds very possible. Is there a way to "Find" a tab? Glad to try that if I knew how to put a tab in the Find area!
Thank you for this wonderful tip! Using your example, I found that the Option+Enter can do the same when searching for new lines.It turns out that option-tab can be used as a search argument in TextEdit to match tabs.
DS
Agreed, TextWrangler is quite nice.You might have more luck with the freeware TextWrangler which has more powerful search tools and can even search folders full of files:
http://www.barebones.com/products/textwrangler/download.html