I\'m trying to use a regexp using sed
. I\'ve tested my regex with kiki, a gnome application to test regexpd, and it works in kiki.
date: 2010-10-29
You are using the -i flag incorrectly. You need to put give it a string to put on the temporary file. You also need to escape your curly braces.
sed -ibak -e "s/author:\s[0-9]\{11\};//g" /tmp/test_regex.txt
I usually debug my statement by starting with a regex I know will work (like 's/author//g' in this case). When that works I know that I have the right arguments. Then I expand the regex incrementally.
The fact that you are substituting author: 00000000000
is already said in sed
when you add the s
before the first /
.