Fix regexp for trailing chars in version