mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
Updated SC3026 (markdown)
@@ -14,9 +14,9 @@ echo foo-[!0]*.jpg
|
|||||||
|
|
||||||
### Rationale:
|
### Rationale:
|
||||||
|
|
||||||
`[^c]` is frequently used in most regular expression variants to mean "any character except `c`". This is so pervasive that bash, ksh, dash, and BusyBox ash, all allow it.
|
`[^c]` is frequently used in most regular expression variants to mean "any character except `c`". Ksh and Bash adopted it for globs as well.
|
||||||
|
|
||||||
However, strictly speaking, the only range complement syntax guaranteed to be supported across shells is `[!c]`.
|
However, strictly speaking, the only range complement syntax guaranteed to be supported across shells is `[!c]`. Dash only supports it when using `fnmatch` and `glob` from glibc.
|
||||||
|
|
||||||
### Exceptions:
|
### Exceptions:
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user