Skip to content

Commit 5e69770

Browse files
committed
readme: improve examples
1 parent 9b27384 commit 5e69770

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1370,7 +1370,7 @@ console.log(fn('Good job! 🎉')); // logs '✅'
13701370
```ts
13711371
const fn = (input: string) =>
13721372
match(input)
1373-
.with(P.string.regex(/^[a-z]$/), () => 'single word')
1373+
.with(P.string.regex(/^[a-z]+$/), () => 'single word')
13741374
.otherwise(() => 'other strings');
13751375

13761376
console.log(fn('gabriel')); // logs 'single word'

0 commit comments

Comments
 (0)