Uh oh!
There was an error while loading. Please reload this page.
Add RegexOptions.AnyNewLine documentation - #12405
Conversation
Add documentation for the new AnyNewLine enum member (value 2048) that makes ^, $, \Z, and . recognize all Unicode newline sequences. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Tagging subscribers to this area: @dotnet/area-system-text-regularexpressions |
There was a problem hiding this comment.
Pull request overview
Adds API reference documentation for the new RegexOptions.AnyNewLine enum member introduced in .NET 11, describing how it changes newline handling for anchors and ..
Changes:
- Documented the
RegexOptions.AnyNewLineenum member (value2048). - Included behavioral details (supported newline sequences) and noted incompatibilities with
NonBacktrackingandECMAScript.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
danmoseley
commented
Mar 18, 2026
@gewarren can we merge? then I guess dotnet/docs#52328 will be green. |
gewarren
commented
Mar 18, 2026
@danmoseley Is this for Preview 3? Normally we don't manually add docs like this. The CI imports it automatically. |
danmoseley
commented
Mar 18, 2026
Ah! I didn't know that. I guess dotnet/docs#52328 should sit for a month or so then? |
gewarren
commented
Mar 18, 2026
Yes, that would be best. |
Add API documentation for the new
RegexOptions.AnyNewLineenum member (value2048), shipping in .NET 11 Preview 3.AnyNewLinemakes^,$,\Z, and.recognize all Unicode newline sequences (\r\n,\r,\n,\u0085,\u2028,\u2029) instead of only\n. This addresses one of the most common pitfalls withSystem.Text.RegularExpressions-- that$doesn't match before\r\nand.matches\r.Related: