March 2018
Beginner to intermediate
416 pages
9h 24m
English
Named character classes is a feature introduced in the POSIX standard. A named character class is a special notation that describes the lists of characters that have a specific attribute, but the actual characters can vary from country to country or from one character set to another. For example, the alphabetic character set can differ between India and China.
A named character class is valid in a regexp, when it is given inside the brackets of a bracket expression. The named character class is enclosed between '[:' and ':]'.
For example, if you want to search for lines having alphabets (uppercase and lowercase both), we can write it as follows:
$ awk '/[[:alpha:]]/' dot_regex.txt
The output on execution ...
Read now
Unlock full access