Fix issue with regular expressions.

Need to use '\\d' instead of '\d'. Also gave names to the overridden
functions.