This repository was archived by the owner on May 14, 2020. It is now read-only.
  
  
  
  
  
Description
The following rules
942432 942430 942431 942421 942420
seem to escape all characters inside the character class as a matter of course. Most of the backslashes are not needed and are indeed prone to cause problems. Inside character classes, only the caret ^, the hyphen -, the closing bracket ] and the backslash itself are metacharacters. We should heed the advice in http://www.regexguru.com/2008/04/escape-characters-only-when-necessary/, so the regex should be (double quote escaped because it's inside a string, ^ not escaped because it's not at the start of the range):
"((?:[~!@#$%^&*()\-+={}[\]|:;\"'´’‘`<>][^~!@#$%^&*()\-+={}[\]\|:;\"'´’‘`<>]*?){N})"
with N = 2, 3, 6, 8 or 12, depending on the rule.