Fixing RegExp unit tests