Is there any difference between the three ways of writing in the regular expression []?

1[0-9a-zA-Z]
2[0-9,a-z,A-Z]
3[0-9|a-z|A-Z]

is there any difference between these three ways of writing? It seems to mean either numbers, lowercase letters, or uppercase letters. -sharp-sharp-sharp problem description

Jun.09,2021

  1. the first matching numeric uppercase and lowercase letters
  2. the second matches numbers, uppercase and lowercase letters,
  3. the third one also matches numbers, uppercase and lowercase letters, and |

1, [0-9a-zA-Z]

var reg = /[0-9|a-z|A-Z]/g;
reg.test('|'); // true
Menu