Open
Description
Description
I'm encountering an IndexOutOfRangeException when using the following regex:
string r = "(?>(-*)+?-*)$";
Reproduction Steps
Use the above regular expression with Regex.Match.
Match against any non-zero length string.
A reproduction can be found here:
https://sharplab.io/#v2:C4LgTgrgdgNAJiA1AHwAIEYB0AVApgD2EwCVcBzCAGwEMwBRfABzFwGdWBLAeylZPIKYAstWABjABYAKAESYZMGVID8APikBaAFQBKRMu06AJDJ0BuIA
I removed as much from it as much as I could.
Expected behavior
The function should return without throwing an error.
Actual behavior
The function throws an IndexOutOfRangeException
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
It should be noted that I observed the same error thrown from multiple internal functions, as I removed parts of the expression to simplify it.