Using character range in a character classe [a-z]
What is a character range in a character class? How to specify a character range in a character class in a regular expression?
I have a string of hexadecimal digits, 46594963656E7465722E636F6D and want to use character ranges in a character class to validate it.
A character range defines a set of possible characters of an ASCII code range using '-' between the first and the last character of the range in a character class.
Here are some examples of character ranges:
[0-9] # same as  [A-F] # same as [ABCDEF]
If '-' is the first or last character in a character class, it is treated as an ordinary character.
The regular expression to a match a string of hexadecimal digits is:
[0-9a-fA-F] [ - begin of a character class 0-9 - character range from 0 to 9 a-f - character range from a to f A-F - character range from A to F ] - end of a character class
2013-01-22, 2227👍, 0💬
According to the IEEE 802 specification, a MAC address has 6 groups of 2 hexadecimal digits separate...
Are you having problems using regular expressions when processing text strings in your applications ...
A free online regular expression test tool that allows to try you regular expression pattern and see...
All credit card numbers issued by MasterCard must start with 51 through 55 and have 16 digits. For e...
How to write a regular expression to validate GUID (Globally Unique IDentifier) or UUID (Universally...