string like operation

This commit is contained in:
bagnaram 2024-07-26 14:40:10 -06:00
parent 0f47cbb889
commit 4826a52306
No known key found for this signature in database
GPG key ID: F146C87EF7159A9B
6 changed files with 88 additions and 7 deletions

View file

@ -265,6 +265,26 @@ To match for empty strings, use ' "" ':
<tag> == ""
```
String glob matching
To perform string matching using globbing with "\*" & "?" characters:
\* Match any zero or more characters.
? Match exactly any one character.
```
<tag> ~~ "hello*"
```
Will match any string starting with "hello", including "hello",
"hello1", "hello123", etc.
```
<tag> ~~ "hello?"
```
Will match any string starting with "hello" followed by any single
character, including "hello1", "hello-", but not "hello".
Furthermore, you may use the boolean operators:
[- &&