I am in love with Regex but there is a 'simple' thing I am not able to do. I have been struggling with this for a while (and it's been fun!), so I thought some help would be very sweet. Thanks for already reading this plea!
I have the following string that I would like to match some parts of it:
this is cool--this is nice--this-is-it
I would like a regex that would returns three matches, being them:
this is cool
this is nice
this-is-it
I am trying to match any texts separated by the double dash (--), however, the single dash should be treated as if it were any other character. So far I have tried a few things, but the closer I got was this regex: /[^(--)]+/gm
. That regex is currently returning 5 matches which can be visualized here:
https://regex101.com/r/W58b5W/1
Thank you!