Still exceptions to this regex that cause it to crash with the same error as before.

Removing the $ stops the errors, not sure why it was in there in the first place tbh!