DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Regular expressions

Korn shell regular expressions

In addition to the regular expression notations discussed above, the Korn Shell provides its own syntax. The metacharacters used by this syntax are similar to those used by the generic regular expression handling notations:

Operator Meaning
*(regexp) matches 0 or more instances of regexp
+(regexp) matches 1 or more instances of regexp
?(regexp) matches 0 or 1 instances of regexp
@(regexp1|regexp2|. . .) matches regexp1 or regexp2 or . . .
!(regexp) matches any string except regexp
The OR notation given for the @ metacharacter can be combined with any of the other metacharacters. For example, @(apple|pear|kumquat) matches ``apple'' or ''pear'' or ``kumquat'', while !(apple|pear|kumquat) matches any string except ``apple'' or ''pear'' or ``kumquat''.


© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 22 April 2004