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
Copy file name to clipboardExpand all lines: 9-regular-expressions/11-regexp-groups/04-parse-expression/solution.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -10,8 +10,8 @@ The full regular expression: `pattern:-?\d+(\.\d+)?\s*[-+*/]\s*-?\d+(\.\d+)?`.
10
10
11
11
It has 3 parts, with `pattern:\s*` between them:
12
12
1.`pattern:-?\d+(\.\d+)?` - the first number,
13
-
1.`pattern:[-+*/]` - the operator,
14
-
1.`pattern:-?\d+(\.\d+)?` - the second number.
13
+
2.`pattern:[-+*/]` - the operator,
14
+
3.`pattern:-?\d+(\.\d+)?` - the second number.
15
15
16
16
To make each of these parts a separate element of the result array, let's enclose them in parentheses: `pattern:(-?\d+(\.\d+)?)\s*([-+*/])\s*(-?\d+(\.\d+)?)`.
0 commit comments