in reply to regex greediness
As others have suggested a positive look ahead match ((?=...) is likely to be a key to solving your unspecified problem. We may be able to help better if you let us know what the higher level problem is that you are trying to solve.
|
|---|