I have source code, and I would like to find all lines than end with comma, dot or plus symbols ',' , '.' , '+'
,
So, I have this: (\,|\.|\+)$
- to show lines that end with any of these symbols.
But I want to ignore lines that start with // - commented lines, and they can be preceded with any number of spaces.
I tried this to ignore lines with / at the beginning: ^[^/].*
but this doesn't really work well. Then I also tried to put: \s*
at the beginning to ignore all spaces, but still not working good.
So, my regex would be something like: \s*^[^/].*(\,|\.|\+)$
- skip all spaces at the beginning AND ignore those with / as first symbol AND show those lines that end with ,.+
But this still finds lines with that start with space and /. What am I doing wrong?
EDIT: Here are example lines:
...
// increase no of objects...
counter := 1+
2;
...
I need to ignore comment lines, starting with // but need all lines that end with .,+ as I need to reformat them.