Skip to content

Commit 5f58d7d

Browse files
committed
Update README.md
1 parent 2c200c4 commit 5f58d7d

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,15 @@ print(result7) // false
4848
// Check if text does NOT contain "cat" case insensitively and without diacritics
4949
let result8 = text.contains(!~"cat")
5050
print(result8) // true
51+
52+
// Check if text contains "quick" OR "jumps" AND "fox" using a regular expression
53+
let result9 = text.contains(=~"(quick|jumps).*fox")
54+
print(result9) // true
55+
56+
// Check if text contains "jumps" OR "swift" AND "fox" using a regular expression
57+
let result10 = text.contains(=~"(jumps|swift).*fox")
58+
print(result10) // true
59+
5160
```
5261

5362
## How to Install

0 commit comments

Comments
 (0)