Denys Vlasenko | d2241f5 | 2020-10-31 03:34:07 +0100 | [diff] [blame] | 1 | # malformed regex |
2 | [[ a =~ * ]]; echo 1:ERR2:$? | ||||
3 | |||||
4 | [[ a/b =~ a.b ]]; echo 2:YES:$? | ||||
5 | [[ a/b =~ /*b ]]; echo 3:YES:$? | ||||
6 | |||||
7 | v='[]b.-]' | ||||
8 | [[ a/.b] =~ $v ]]; echo 4:YES:$? | ||||
9 | |||||
10 | v=']b.-' | ||||
11 | [[ a/.b] =~ $v ]]; echo 5:no:$? | ||||
12 | [[ a/.b] =~ [$v] ]]; echo 6:YES:$? |