-
Notifications
You must be signed in to change notification settings - Fork 0
Bash shell regular expression
jaeseok.an edited this page Nov 9, 2021
·
2 revisions
POSIX Bracket Expressions
POSIX bracket expressions are a special kind of character classes. POSIX bracket expressions match one character out of a set of characters, just like regular character classes.
Standard POSIX
[[:alnum:]] Alphanumeric characters
[[:alpha:]] Alphabetic characters
[[:blank:]] Space and tab
[[:cntrl:]] Control characters
[[:digit:]] Digits
[[:graph:]] Visible characters (anything except spaces and control characters)
[[:lower:]] Lowercase letters
[[:print:]] Visible characters and spaces (anything except control characters)
[[:punct:]] Punctuation (and symbols).
[[:space:]] All whitespace characters, including line breaks
[[:upper:]] Uppercase letters
[[:xdigit:]] Hexadecimal digits
None Standards
[[:ascii:]] ASCII characters
[[:word:]] Word characters (letters, numbers and underscores)
legacy syntax (can someone find reference to these?)
[[:<:]] Start of Word
[[:>:]] End of Word
test