Issue #19327: Fixed the working of regular expressions with too big charset.