-
Notifications
You must be signed in to change notification settings - Fork 5
Description
I'm facing one issue with multi-line regex. It is working fine when I tested in https://regex101.com but not working as expected when the rule is executed.
Requirement : I want to find all the tabs (///$tab) except QDF & Main when succeeding line is not commented (//)
Expression : (?m)\/\/\/\$tab\s(?!(QDF|(?i)MAIN))(.*\n)(?!(\/\/.*))
Issue
In below example, only tab1 should be captured as the succeeding line is not commented.
But when I executed it in Sonarqube, even if the subsequent line is commented, the code is captured as a code-smell.
Feature request:
Only the first match is being captured. I would like to capture n issues if there are n-tabs in my text file with no comments (starting with //) in subsequent line.
I'm a beginner with both Regular expression and Sonar-qube, so could you please advise if it's something wrong with the expression/template that I use

