Replaced RegExp type with (Character) Range.
Fixed bug in pattern.loop.match when mismatch occurs in a non-optional pattern.