File tree Expand file tree Collapse file tree 1 file changed +18
-13
lines changed Expand file tree Collapse file tree 1 file changed +18
-13
lines changed Original file line number Diff line number Diff line change @@ -37,29 +37,34 @@ import { RB } from '@gruhn/regex-utils'
37
37
38
38
### Generate random strings from Regex 📜
39
39
40
+ Generate 5 random email addresses:
40
41
``` typescript
41
- // Generate 5 random email addresses:
42
42
const email = RB (/ ^ [a-z ] + @[a-z ] + \. [a-z ] {2,3} $ / )
43
43
for (const str of email .sample ().take (5 )) {
44
44
console .log (str )
45
45
}
46
- // ky@e.no
47
- // cc@gg.gaj
48
- // z@if.ojk
49
- // vr@y.ehl
50
- // e@zx.hzq
51
-
46
+ ```
47
+ ```
48
+ ky@e.no
49
+ cc@gg.gaj
50
+ z@if.ojk
51
+ vr@y.ehl
52
+ e@zx.hzq
53
+ ```
52
54
53
- // Generate email addresses, which have exactly 20 characters:
55
+ Generate 5 random email addresses, which have exactly 20 characters:
56
+ ``` typescript
54
57
const emailLength20 = email .and (/ ^ . {20} $ / )
55
58
for (const str of emailLength20 .sample ().take (5 )) {
56
59
console .log (str )
57
60
}
58
- // kahragjijttzyze@i.mv
59
- // gnpbjzll@cwoktvw.hhd
60
- // knqmyotxxblh@yip.ccc
61
- // kopfpstjlnbq@lal.nmi
62
- // vrskllsvblqb@gemi.wc
61
+ ```
62
+ ```
63
+ kahragjijttzyze@i.mv
64
+ gnpbjzll@cwoktvw.hhd
65
+ knqmyotxxblh@yip.ccc
66
+ kopfpstjlnbq@lal.nmi
67
+ vrskllsvblqb@gemi.wc
63
68
```
64
69
65
70
### Refactor Regex then Check Equivalence 🔄
You can’t perform that action at this time.
0 commit comments