I'm looking for grep to show all characters which do not starts with numbers.
I have done something like this:
grep -v '^[1-2]*[a-zA-Z]?' -o
but it do not work.
Do you have any idea for some reg exp?
grepregular expression
I'm looking for grep to show all characters which do not starts with numbers.
I have done something like this:
grep -v '^[1-2]*[a-zA-Z]?' -o
but it do not work.
Do you have any idea for some reg exp?
Best Answer
grep -v '^[0-9]'
Will output all the lines that do not (
-v
) match lines beginning^
with a number[0-9]
For example
or if you want to remove all the words that begin with a digit
or with shortcuts and assertions
For example