3
I'm trying to figure out how to deal with whitespace in grep
. How do I tell grep
to find strings containing whitespace or tabs? The manual tells me nothing. \s
seems to work for whitespace, and \S
seems to work for non-whitespace, but it includes all whitespace characters (spaces AND tabs) and it doesn't work if I put it in brackets, treating the backslash and the \s
as separate characters.
1You'll need to get more clear with your question. Maybe put in an example of data and what you'd expect to match. – nik – 2013-05-29T02:51:36.973
Yes, it isn't entirely clear what you mean. What would you like to do precisely? And what does it mean to say that you put "in brackets, treating the backslash and the s as separate characters"? – ShankarG – 2013-05-29T05:18:06.330
3"whitespace or tabs"? Tabs are whitespace. – user1686 – 2013-05-29T08:32:07.253