Hi, another one stuck in Regex land... having the following line
Word "Blabla" -Option1:Bla di Bla -Option2:Ha
I want to match the 2 "options" at the end such that I have the groups:
- Option1
- Bla di Bla
- Option2
- Ha
What I have so far is this: -(\w+?):(.+?)(?=-|$)
Which I thought should mean: "A hyphen, followed by a word, followed by a colon, followed by some amount of characters that are followed either by a hyphen or a newline, without consuming any of the two"
But somehow it goes wrong, only the first 2 groups will be captured. Where am I going wrong?