I'm trying to do some code refactoring and as I'm doing quite a lot I'm using WebStorm's regex find in files to see which files still need refactoring.
I know this (?:^|(?=[^']).\b)(this.user|this.isVatRegistered|showStatsInNet)\b
will show all files with one of those bits of code in.
And according to this post: Match string that doesn't contain a specific word ^(?!.*UserMixin).*$
should do a negative look ahead to match only when that word doesn't exist.
My problem is I don't know how to combine them. Would someone be able to provide some guidance please?
I've tried combining like so: (?:^|(?=[^']).\b)(?!.*UserMixin)(this.user|this.isVatRegistered|showStatsInNet)\b
but to no avail.
TL;DR How do I match on X number of words only when another word isn't present?