I need to construct a regex that will match patterns like H10, but do not match patterns like H10=123 (note: instead of H there may be [A-z], instead of 10 – [0-9]+)
This one works perfectly on regex101.com: [A-Z]d+[^= ](?!=)
G9=51 // false
H10=10 // false
H10 // true
G0 // true
G0=0 // false
But in JS I have the following problem:
'G10'.match(/[A-Z]d+[^= ](?!=)/g) // ['G10']
'G1'.match(/[A-Z]d+[^= ](?!=)/g) // null
The problem is that in JS for a strange reason this regex does not catch patterns with only single number, like G1. Why this can happen if it is a valid regex according to regex101.com?