Hello straight to the point: I have this regex:
You can see regex (?:-|role:)??\binfo-ansible[\s|,]
I'm trying to match all strings in this case "info-ansible" with rules:
- It has to start by "- " or "role: " (example: role: info-ansible)
- It has to end either by white-space or ","
Those rules are already implemented into regex
In the very first match you can see it matched info-ansible,
I dont want "," to be included in the match.
Seems to be like very simple problem but i spent so much time on it already.
The is link to online regex tool with those texts already in: https://regex101.com/r/Xixz3O/3