used the same regex as used in php
tried to make the test less dangerous