What is Nostr?
Brennan Stehling /
npub174z…ypsh
2023-09-12 04:20:57
in reply to nevent1q…nk4n

Brennan Stehling on Nostr: npub1p9kjc…m865w You can do this. I add boundaries and used the range from the ...

npub1p9kjc5uauqdfphar82xmq573tf3hnh3mcugkw3t6mjg2y76xkd3sum865w (npub1p9k…865w) You can do this. I add boundaries and used the range from the match on the input.

```
let inputs = ["A cat meowed", "A dog barked"]
let regex = /\b[a-z]{3}\b/
for input in inputs {
if let match = input.firstMatch(of: regex) {
print("Match:", input[match.range])
}
}
// loop over all matches
for input in inputs {
for match in input.matches(of: regex) {
print("Match:", input[match.range])
}
}
```
Author Public Key
npub174zpfrn9vt8ezf4narj83sq2d86zq09t9226kgs8vjhxcexlylcscxypsh