regex-belt 0.1.4 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +56 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -23,40 +23,86 @@ countries.br.cpf.test('123.456.789-09'); // true
|
|
|
23
23
|
### Countries / BR
|
|
24
24
|
|
|
25
25
|
<table>
|
|
26
|
-
<tr><th>Name</th><th>Description</th></tr>
|
|
27
26
|
<tr>
|
|
28
|
-
<td><code>cpf</code></td>
|
|
27
|
+
<td><b><a href="./src/regexen/countries/br/cpf.ts"><code>cpf</code></a></b></td>
|
|
29
28
|
<td>Matches a Brazilian CPF number in the format XXX.XXX.XXX-XX</td>
|
|
30
29
|
</tr>
|
|
31
30
|
<tr>
|
|
32
|
-
<td colspan="2"
|
|
31
|
+
<td colspan="2">
|
|
32
|
+
<details><summary>Examples</summary>
|
|
33
|
+
|
|
34
|
+
:white_check_mark: `123.456.789-09`
|
|
35
|
+
|
|
36
|
+
:x: `12345678909`
|
|
37
|
+
|
|
38
|
+
</details>
|
|
39
|
+
</td>
|
|
40
|
+
</tr>
|
|
41
|
+
<tr>
|
|
42
|
+
<td colspan="2"><pre lang="javascript"><code>/^\d{3}\.\d{3}\.\d{3}-\d{2}$/</code></pre></td>
|
|
33
43
|
</tr>
|
|
34
44
|
</table>
|
|
35
45
|
|
|
36
46
|
### Datetime
|
|
37
47
|
|
|
38
48
|
<table>
|
|
39
|
-
<tr><th>Name</th><th>Description</th></tr>
|
|
40
49
|
<tr>
|
|
41
|
-
<td><code>dashedDateLoose</code></td>
|
|
50
|
+
<td><b><a href="./src/regexen/datetime/dashed-date-loose.ts"><code>dashedDateLoose</code></a></b></td>
|
|
42
51
|
<td>Matches a date in the format YYYY-MM-DD Valid digits are 0000 to 9999 for year, 01 to 12 for month and 01 to 31 for day</td>
|
|
43
52
|
</tr>
|
|
44
53
|
<tr>
|
|
45
|
-
<td colspan="2"
|
|
54
|
+
<td colspan="2">
|
|
55
|
+
<details><summary>Examples</summary>
|
|
56
|
+
|
|
57
|
+
:white_check_mark: `2022-12-31`
|
|
58
|
+
|
|
59
|
+
:white_check_mark: `2022-12-31T23:59:59.999Z`
|
|
60
|
+
|
|
61
|
+
:white_check_mark: `9992022-12-31`
|
|
62
|
+
|
|
63
|
+
</details>
|
|
64
|
+
</td>
|
|
65
|
+
</tr>
|
|
66
|
+
<tr>
|
|
67
|
+
<td colspan="2"><pre lang="javascript"><code>/([0-9]{4}-([0][1-9]|[1][0-2])-([1-2][0-9]|[0][1-9]|[3][0-1]))/</code></pre></td>
|
|
46
68
|
</tr>
|
|
47
69
|
<tr>
|
|
48
|
-
<td><code>dashedDate</code></td>
|
|
70
|
+
<td><b><a href="./src/regexen/datetime/dashed-date.ts"><code>dashedDate</code></a></b></td>
|
|
49
71
|
<td>Matches a date in the format YYYY-MM-DD Valid digits are 0000 to 9999 for year, 01 to 12 for month and 01 to 31 for day.</td>
|
|
50
72
|
</tr>
|
|
51
73
|
<tr>
|
|
52
|
-
<td colspan="2"
|
|
74
|
+
<td colspan="2">
|
|
75
|
+
<details><summary>Examples</summary>
|
|
76
|
+
|
|
77
|
+
:white_check_mark: `2022-12-31`
|
|
78
|
+
|
|
79
|
+
:x: `2022-12-31T23:59:59.999Z`
|
|
80
|
+
|
|
81
|
+
:x: `9992022-12-31`
|
|
82
|
+
|
|
83
|
+
</details>
|
|
84
|
+
</td>
|
|
85
|
+
</tr>
|
|
86
|
+
<tr>
|
|
87
|
+
<td colspan="2"><pre lang="javascript"><code>/^([0-9]{4}-([0][1-9]|[1][0-2])-([1-2][0-9]|[0][1-9]|[3][0-1]))$/</code></pre></td>
|
|
53
88
|
</tr>
|
|
54
89
|
<tr>
|
|
55
|
-
<td><code>isoUtc</code></td>
|
|
90
|
+
<td><b><a href="./src/regexen/datetime/iso-utc.ts"><code>isoUtc</code></a></b></td>
|
|
56
91
|
<td>Regex that matches a UTC ISO String Date in format YYYY-MM-DDTHH:mm:ss.sssZ</td>
|
|
57
92
|
</tr>
|
|
58
93
|
<tr>
|
|
59
|
-
<td colspan="2"
|
|
94
|
+
<td colspan="2">
|
|
95
|
+
<details><summary>Examples</summary>
|
|
96
|
+
|
|
97
|
+
:white_check_mark: `2022-12-31T23:59:59.999Z`
|
|
98
|
+
|
|
99
|
+
:white_check_mark: `2022-12-31T23:59:59Z`
|
|
100
|
+
|
|
101
|
+
</details>
|
|
102
|
+
</td>
|
|
103
|
+
</tr>
|
|
104
|
+
<tr>
|
|
105
|
+
<td colspan="2"><pre lang="javascript"><code>/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{3})?Z$/</code></pre></td>
|
|
60
106
|
</tr>
|
|
61
107
|
</table>
|
|
62
108
|
|