Fixed a RegExp and Ruby warning