Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vim removing xml tags

Tags:

regex

vim

sed

I have a one liner in vim which I regularly use for find and replace.

I now want to use it to remove tags - something like this but I looks like I need to escape the / I'm not sure what am I missing.

:%s~<Validator>*</Validator>~~g
like image 927
wmitchell Avatar asked Jan 28 '26 13:01

wmitchell


1 Answers

:%s~<Validator>.*</Validator>~~g

Does the trick

like image 123
wmitchell Avatar answered Jan 30 '26 04:01

wmitchell



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!