regex digit between values code example
Example 1: regex ranges
regex = /[a-z]/;
regex = /[A-Z]/;
regex = /[e-l]/;
regex = /[F-P]/;
regex = /[0-9]/;
regex = /[5-9]/;
regex = / [a-d1-7]/;
regex = /[a-zA-Z]/;
regex = /[^a-zA-Z]/;
Example 2: regex match number
For matching an integer number of one single char/digit, specify:
[0-9]
But for matching any number of more than one char/digit; add "+":
[0-9]+
Example for matching hour with minutes of HH:MM format in a file:
grep "[0-9]\+\:[0-9]\+" file.txt