๖ۣۜSuperPyroManiac
Explore posts from servers❔ Convert regex match groups into parameters
So I have a program that is checking for common errors in a log, it uses regex to capture them, then also groups some information in them.
I then match them up with a solution which has some {#} parameters which I replace with the groups. Right now im using a gross string.Replace() method which is being inconsistent so i'd rather use the parameters correctly, issue is I don't know how many parameters or groups there are depending on the match.
error is an object that contains the regex, solution, and unique ID.
errorData is a list of said errors.
35 replies