This PR attempts to resolve the issue mentioned in #1175
Regex has been changed in order to allow matching a given line even if it has a comment (separated with space or not) from the main expression.
When passing through an argument, check if it contains the comment character # and if it does, try to get the content on its left side.
Thoughts:
I have some doubts strtok is the best choice.
Another approach, better imo, would be to get the first match from the regex expression. I failed to find an example in the project where cli_regexec returns the made matches (most likely in the 4th argument, but it seems its used mostly with NULL through out the project).
This PR attempts to resolve the issue mentioned in #1175
#
and if it does, try to get the content on its left side.Thoughts:
strtok
is the best choice.cli_regexec
returns the made matches (most likely in the 4th argument, but it seems its used mostly withNULL
through out the project).