For #14: Remove dependency on regex module.

Remove dependency on regex module.