Can a regex return a match that's not a part of the original string?
- by Vishnu
I'm using an application that requires me to provide a regex for various files. It uses the matches from the regex to uniquely identify each file and then use a data store to retrieve metadata about these files.
there is however a problem with the application, so it assumes that the data which is used to identify each file is only numeric data. Hence, it stores the results of matches in integers.
I control the data store but not the names of the files. Since the application has a bug in it, I was hoping that I could use an encoding scheme to convert the non-numeric data to an integer. But for that I'd require the regex to return something that's not part of the original string as a match. Is this possible?