I'm using a simple regular expression on some text data. The expression seems to work fine. The problem I need to get around now, is to only return one result per match as seen in desired matches below. Of course the data would be much larger than this.
Example Data:
stuffbefore233/stuffafter
stuffbefore233/stuffafter
stuffbefore111/stuffafter
stuffbefore111/stuffafter
Regular Expression:
(?<=stuffbefore)[\d]+(?=/stuffafter)
Current matches:
233
, 233
, 111
, 111
Desired matches:
233
, 111
I hope that makes sense. Please let me know if you need any more information.