Changes the regexp that avoid unexpected content

The regexp is now now more restrictive, there is not need to accept
characters there we are not expecting.