regex - sed: remove numbers from file -


i'm trying remove words file contain number

attempt

sed -r 's/\w*\d\w*//g' file.txt

sample file.txt:

12.23 worda 01234 wordb wordc fe424 wordd  a232efe424 worde 7 a232efe424 wordf wordg 7 a232efe424 wordh h5f 

desired ouput:

worda wordb wordc wordd worde wordf wordg wordh 

sed oneliner

sed -r 's/[^[:space:]]*[0-9][^[:space:]]* ?//g' 

Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -