in reply to How do you match

Use a negative lookahead assertion (and you don't need the '$_ =~' when its the '$_' variable):
s/^confederation-as-router\:\W+\d\W+\d+\W(?!.*cr\d$)//;