I'm trying to implement a regex that will output the Code Coverage only for Branches after running the dotnet test
command by using the Gitlab CI Test coverage parsing but I'm a little bit stuck.
Regex is kind of hard for me, and I don't understand why this command isn't working properly ^\s*(\d+(?:\.\d+)?%)\s*lines
Does anyone have any ideas? Thanks in advance!
The easiest way to debug is to use a service like https://regexr.com.
I have put your regex in https://regexr.com/49pjk with an text input example, and you can see:
With that, you should be able to debug it.