Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upNon-standard index in Regex.Match when using Regex.replace #748
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
process-bot
Nov 5, 2016
Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!
Here is what to expect next, and if anyone wants to comment, keep these things in mind.
process-bot
commented
Nov 5, 2016
|
Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it! Here is what to expect next, and if anyone wants to comment, keep these things in mind. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
|
This may have been fixed by #736. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
lazamar
commented
Nov 6, 2016
|
Yes, that is it. Thanks. |
lazamar
closed this
Nov 6, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
lazamar commentedNov 5, 2016
•
edited by lukewestby
Edited 1 time
-
lukewestby
edited Nov 5, 2016 (most recent)
Matches from Regex.replace have the value
<internal structure>in theirindexkey instead of an integer. This value always yields false when compared to other integers and returnsNaNwhen summed to an integer.This also makes it not possible to compare matches from
Regex.findwith matches fromRegex.replaceas the comparison always outputs false.Examples
Incompatible matches
NaN result in integer operations
Using the same values form
randt.Always false when compared to other ints
Non-standard index in Regex.Match