I have the following regex:
%(?:\\.|[^%\\ ])*%([,;\\\s])
That works great but obviously it also highlights the next character to the last %
.
I was wondering how could I exclude it from the regex?
For instance, if I have:
The files under users\%username%\desktop\ are:
It will highlight %username%\
but I just want %username%
. On the other hand, if I leave the regex like this:
%(?:\\.|[^%\\ ])*%
...then it will match this pattern that I don't want to:
%example1%example2%example3
Any idea how to exclude the last character in the match through a regex?
%(?:\\.|[^" %\d\\])*%