Regex to match 'product' but not 'production' or 'products'? -


this question has answer here:

is there way can write regular expression matches 'product' not 'production' or 'products'?

the input string 'oil production', or 'production', or 'products'.

i'm pretty sure you're looking "negative lookahead": product(?!s|ion) match product, if it's followed s or ion ignore , keep looking.


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -