The difference is not the \\ but the lack of $ at the end.  As it stands this regex will match "1abc", which is probably not valid, either way, as a port or a parameter!