fix if regex match

The regex string should not have any quotes around it. To validate test:
$ if [[ "A" =~ . ]]; then echo pass; else echo fail; fi
with and without quotes
This commit is contained in:
Beathan Andersen 2019-10-16 13:52:50 -05:00 committed by GitHub
parent 4da6b9adbe
commit c5006cfd4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -424,7 +424,7 @@ if [[ "$A" == "$B" ]]
```bash ```bash
# Regex # Regex
if [[ "A" =~ "." ]] if [[ "A" =~ . ]]
``` ```
```bash ```bash