课程: AWK Essential Training

今天就学习课程吧!

今天就开通帐号,24,700 门业界名师课程任您挑!

Working with character classes and quantifiers

Working with character classes and quantifiers - Linux教程

课程: AWK Essential Training

Working with character classes and quantifiers

- [Instructor] A set of characters between square brackets matches any single character in the set. For example, A bracket XYZ bracket C matches an A followed by a letter X, Y, or Z, followed by a C. But the X, Y, Z within brackets matches only a single character from the set. This does not match A, X, Y, Z, C. It has to be either a single X, a single Y, or a single Z. This set of characters between square brackets is called a character class. In this case, the characters in the class are lowercase X, Y, and Z. You can also specify a range of characters between square brackets. For example, bracket A dash Z bracket matches any single lowercase character. Zero dash nine matches any digit. Uppercase A dash uppercase L matches any uppercase letter from A through L inclusive. Ranges can be combined with other ranges or individual characters between the square brackets. For example, in this case, bracket lowercase a dash…

内容