Fixed a RegExp and Ruby warning

Fixed a Regexp, it should be `[[:digit:]]` instead of `[:digit:]`.