Regex: How to get the value of a capture group when the input is a ReadOnlySpan<char>? #107510
-
I struggle with the To illustrate my problem, lets imagine this simple task: For the given input string: ReadOnlySpan<char> input = "12a34b567c890a123c45b678c90"; get the integer values in With the So, now what? Is the only way forward (with respect to using Regex) to turn the (P.S.: I am not interested in workarounds like employing a sequence of multiple regex pattern matches that break down the input into the parts of interest, and/or copious amounts of look-ahead and look-behind assertions. Because such an approach becomes quickly impractical and error-prone not only from a code maintenance view but especially if the regex patterns need to be configurable outside of the code (for example through a configuration/INI file). |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Yes. Span-based input that also supports full reporting of captures is covered by #73223. |
Beta Was this translation helpful? Give feedback.
Yes. Span-based input that also supports full reporting of captures is covered by #73223.