Generex currently replaces predefined character classes while wrapping them in square brackets: \d becomes [0-9]
However, if the \d is already in a character class expression then [\d] becomes [[0-9]], which is compilable correctly by java.util.regex.Pattern but not by dk.brics.automaton.Automaton used by Generex.
Simple regex replacement is apparently not enough, it looks like contextual replacement is needed (tracking if \d is inside [..] char by char, tracking already escaped \)
Input: [\d] (Java String literal "[\\d]")
Expected output:
- transformed regex
[0-9]
- all matched strings:
Actual output:
- transformed regex
[[0-9]]
- all matched strings:
0]
1]
2]
3]
4]
5]
6]
7]
8]
9]
[]