I need to match variables that start with a lowercase letter and don't end in an underscore.
I have these three fields:
private String shouldFlag;
private String shouldntFlag_;
private String SHOULDNTFLAG;
With this pattern inverted:
^[a-z].*_$
Used with for fieldname in the following template:
class $Class$ {
$FieldType$ $FieldName$ = $Init$;
}
The problem is that SHOULDNTFLAG
is still flagged. I tried using ^[a-z].*_$|^[A-Z].*$
, but that did not match anything, let alone just shouldFlag
. What am I doing wrong here?