strops2.tests 234 B

123456789101112
  1. # malformed regex
  2. [[ a =~ * ]]; echo 1:ERR2:$?
  3. [[ a/b =~ a.b ]]; echo 2:YES:$?
  4. [[ a/b =~ /*b ]]; echo 3:YES:$?
  5. v='[]b.-]'
  6. [[ a/.b] =~ $v ]]; echo 4:YES:$?
  7. v=']b.-'
  8. [[ a/.b] =~ $v ]]; echo 5:no:$?
  9. [[ a/.b] =~ [$v] ]]; echo 6:YES:$?