bash - Unix - Delete a portion which matches a regex -


i have log file , trying tidy use data inside. want use sed 's/foo//g' except instead of matching word foo want delete foo until next space.

i tried (without success):

sed -e -- 's/(?<=foo)(.*)(?= )//g'

any ideas?

i want delete foo until next space.

you can use:

sed 's/foo[^[:blank:]]*//g' file 

[^[:blank:]] match character not space , not tab.


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

nginx - phpPgAdmin - log in works but I have to login again after clicking on any links -