Stronger regex to fix substring bug.