Given a string in the following format:
xxx (aaa - bbb - CC-dd - ee-FFF)
I need to write a regex that returns a match if there are more than 3 " - " strings inside the parenthesis.
It also needs to split the string (by " - " - space, hyphen, space) and return each of those groups in a separate match. So given the above string, I expect the following matches:
- aaa
- bbb
- CC-dd
- ee-FFF
I have the following regex...
\((([\w]).*(.[-].*?){3,}([\w]))\)
but I'm struggling to split the string and return the matches I need.