Solution

I fixed it with regular expressions.