I'm searching for a regex that matches all words, but will give only one match.
What I have:
Regex: (.*\={1})\d+(\D*)
Input: max. Money (EU)=600000 Euro
Output: Euro
This works fine, but it's possible that the Input is like this: max. Money (EU)=600000 Euro plus 20000 for one person
.
Before the =
could be anything, the only thing that I know is that the =
is fixed. So every input have this.
So I'm searching for a regex that will give me for this input this output: Euro plus for one person
.
I tried to use a regex like (\D+)
, but I'll get for this input 3 matches. Does someone know how to get all occurences in one match?