You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TS Regex Builder allows you to build complex regular expressions using domain-specific language.
67
63
68
64
Terminology:
65
+
69
66
- regex construct (`RegexConstruct`) - common name for all regex constructs like character classes, quantifiers, and anchors.
70
67
- regex element (`RegexElement`) - a fundamental building block of a regular expression, defined as either a regex construct, a string, or `RegExp` literal (`/.../`).
71
68
- regex sequence (`RegexSequence`) - a sequence of regex elements forming a regular expression. For developer convenience, it also accepts a single element instead of an array.
72
69
73
70
Most of the regex constructs accept a regex sequence as their argument.
74
71
75
72
Examples of sequences:
73
+
76
74
- single element (construct): `capture('Hello')`
77
75
- single element (string): `'Hello'`
78
76
- single element (`RegExp` literal): `/Hello/`
@@ -152,6 +150,7 @@ See [Character Classes API doc](./docs/API.md##character-classes) for more info.
Copy file name to clipboardexpand all lines: docs/API.md
+42-25
Original file line number
Diff line number
Diff line change
@@ -14,8 +14,7 @@ Fundamental building blocks of a regular expression, defined as either a regex c
14
14
15
15
The common type for all regex constructs like character classes, quantifiers, and anchors. You should not need to use this type directly, it is returned by all regex construct functions.
16
16
17
-
Note: the shape of the `RegexConstruct` is considered private and may change in a breaking way without a major release. We will focus on maintaining the compatibility of regexes built with
18
-
17
+
Note: the shape of the `RegexConstruct` is considered private and may change in a breaking way without a major release. We will focus on maintaining the compatibility of regexes built with
19
18
20
19
## Builder
21
20
@@ -133,14 +132,15 @@ Quantifiers in regex define the number of occurrences to match for a pattern.
0 commit comments