Linux [Electronic resources]

Janet Valade

نسخه متنی -صفحه : 357/ 262
نمايش فراداده

Exclude a Set of Literal Characters ( [^ ] )

You can put a set of literal characters inside square brackets, proceeded by a circumflex (^). The pattern matches only if none of the set of characters is found.

Regular Expression

Match

Not a Match

a[^bcd]ef

axef, akef

abef, acef, adef, axkef

a[^b-d]ef

axef, akef

abef, acef, adef, axkef

file[^1-2][0-9]?

file3, file45

file, file1, file10