regexp question
I use bash2.05.
echo "ab]" | grep '^[a-z]*$ How to add ']' in a set of acceptable symbols? \] doesn't work |
'man regexp' explains how to do it, in the section titled 'Regular Expressions' (last paragraph).
|
I don't think grep handles regular expressions unless you give the -E or -G option. I could be wrong, but I don't know why they would include those options if grep handled regexps out-of-the-box.
|
Shortly speaking, RTFM, as usual:
[To include a literal ] place it first in the list. Similarly, to include a literal ^ place it anywhere but first. Finally, to include a literal - place it last] |
All times are GMT -5. The time now is 09:48 PM. |