I have a text, where I would like find all matchings
(e.g. every pattern which match /d.g/ )
Those patterns I need in a list and removed from original text.
Operation on: dog and dig where dug in dug should give me:
(dog, dig, dug, dug).
The text should change to: and where in
I could do It by passing the text twice, but it would be double work?
Here’s another option:
Output: