Hi,
I have an issue with the BC regex engine used for the grammar rules.
When I compare .c files, I don't want it to classify as unimportant any comment which contains a predefined keyword or keywords
For example,
/* This is a comment, it's not important */
/* ABC This is a single line precompilation directive, it's important */
/* ABD This is another single line precompilation directive, it's important */
So the characters ABC and ABD are important.
The default config for beyond compare has it classify as a comment anything from /* to */ which would classify my directives as unimportant differences. This is why I need to change the rule somehow to ignore any line with the letters ABC or ABD as per the structure of my previous example without losing the ability to hide regular comments which are indeed unimportant.
I can manage this easily with the regex engine used in the search feature, but as I understand, this is not the same engine as the regex used for the grammar feature. A such, I can't use any lookahead regex functionality.
If I could, I could write something like this
^/\*.(?!AB(C|D)).*$
What expression could I used to classify comments as being anything from /* to */ that does NOT containt the keyword ABC or ABD positioned as in my example
This is driving me crazy haha.
Thanks for the help
I have an issue with the BC regex engine used for the grammar rules.
When I compare .c files, I don't want it to classify as unimportant any comment which contains a predefined keyword or keywords
For example,
/* This is a comment, it's not important */
/* ABC This is a single line precompilation directive, it's important */
/* ABD This is another single line precompilation directive, it's important */
So the characters ABC and ABD are important.
The default config for beyond compare has it classify as a comment anything from /* to */ which would classify my directives as unimportant differences. This is why I need to change the rule somehow to ignore any line with the letters ABC or ABD as per the structure of my previous example without losing the ability to hide regular comments which are indeed unimportant.
I can manage this easily with the regex engine used in the search feature, but as I understand, this is not the same engine as the regex used for the grammar feature. A such, I can't use any lookahead regex functionality.
If I could, I could write something like this
^/\*.(?!AB(C|D)).*$
What expression could I used to classify comments as being anything from /* to */ that does NOT containt the keyword ABC or ABD positioned as in my example
This is driving me crazy haha.
Thanks for the help
Comment