Fix u.pl

Prevent u.pl from crashing if the given regexp is not valid.