O'Reilly logo

Learning AWK Programming by Shiwang Kalkhanda

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Unary operator for repetition

The *, +, and ? symbols are known as unary operators, which are used to specify repetitions in regular expressions. They are also known as modifiers. For example, we can use the unary operator for repeating character classes. However, the important thing is it repeats entire character class and not just the character it matched. The [0-9]+ regular expression can match one or more digits; it can be 987654321, or 222, or 333, and so on.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required