Replaced regex with python builtin.