I have strings that look like this for example subnet 1 ims-0-x ip address
and I want to get rid of the -x
so it will be subnet 1 ims-0 ip address
I tried doing this regex replace
$string=~ s/\\-x//;
which is not working. I think my issue is that I am not escaping the dash properly. please help me fix that one line.