Closed abador closed 6 years ago
Thank you for the feedback and the suggestion of a pattern code.
I played around with the pattern Mining\s*Laser\s(?!Upgrade)
on http://regexstorm.net/tester
I found this pattern would not match the input of Mining Laser
. Is this intended?
Do you see a downside to using a pattern which would match Mining Laser
too?
@Viir Sorry, I was out for a bit. That was unintended. I think the best way would be to change the first regex to "Mining\sLaser$" (you find everything that ends with "Minign Laser"), and add the previous one "Mining\sLaser\s(?!Upgrade)" to negate everything that is an upgrade
I think the best way would be to change the first regex to "Mining\sLaser$" (you find everything that ends with "Minign Laser"), and add the previous one "Mining\sLaser\s(?!Upgrade)" to negate everything that is an upgrade
Nice! I see no problem so far with these patterns and I think it can be implemented just like this.
I adapted the code accordingly with commit 70ce068d1672896a3a9b6aa4f0bc3f1a2d05f0bb.
Try to use a "Mining Laser Upgrade". The regex should have a negative clause for the word Upgrade. I think this should do the trick: "Mining\s*Laser\s(?!Upgrade)"