[A-z0-9]+ regexp matching square brackets [duplicate]

Solution 1:

Because

[A-z0-9]+ 
 ↑ ↑ 

is from A to z, see the ASCII table, ] appears between the two characters:

enter image description here

Solution 2:

A===>64
z===>122
[===>91

So it is in between the range you have defined.Use [A-Za-z0-9]+