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: docs/Correctly-Using-Regular-Expressions-Rationale.md
+33Lines changed: 33 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -477,6 +477,39 @@ Many developers believe that regex notation is the same everywhere, even though
477
477
478
478
Such changes would take years to adopt. Even worse, these changes might not be accepted in some cases because some people may think that merely being possible to do something is adequate. We don’t agree; we think it’s important to make it _easy_ to do the secure action, not just possible, and it’s best to make avoidable mistakes les likely. These changes require implementations in many systems and modifications of many specifications; doing this has been historically challenging. Still, such changes would reduce the likelihood of these problems worldwide.
479
479
480
+
#### Status of adding \A and \z across ecosystems
481
+
482
+
As previously noted, one start is to have a _single_ regex syntax
483
+
that _always_ means "match beginning of input and "match end of input"
484
+
_even_ when a multi-line mode is enabled.
485
+
This notation is especially important for security, because they make it
486
+
practical to use regexes for input validation.
487
+
488
+
Many platforms already support \A and \z respectively for beginning-of-input
0 commit comments