Fix regexp for port number when init dumper script

fixes #1879