0

Hello I'm trying to get my regex working.

Usually I can use a negative look behind to solve my issue, but javascript doesn't allow negative look behind.

I'm trying to match anything with Utility and Not Unit.

(Utility Type) //should match
(Utility Unit) //should not match
(util type) //should match
(utility) //should match

I've got /^(.*util.*)(?<!unit)$/gi working.. But like I mentioned, negative look behind doesn't work in javascript. If you guys can think of another way to this, i'd appreciate the help.

Thanks,

caden311
  • 972
  • 8
  • 22

0 Answers0