I used to use grep -P
successfully earlier, till I got a machine where grep is not compiled with Perl regular expression support. Now I am having trouble matchi
The Perl-RegEx understand '[\t]', so you can do like this:
echo -e "\t : words" | grep -P '^[\t]'
the basic-regexp and extended-regexp need for these a "blank" (RegEx for "Space" / "Tab"):
echo -e "\t : words" | grep -G '^[[:blank:]]'
echo -e "\t : words" | grep -E '^[[:blank:]]'
maybe you can use it this way:
echo -e "\t : words" | grep -E '^[[:blank:]]{2,8}'
echo -e "\t : words" | grep -G '^[[:blank:]]\{2,8\}'