example string "hello" I need an express for validating user input, in this context valid and invalid input are as follows:
valid: "hello", "hell", "lol" .... etc.
invalid: "heel", "loo"... etc.
I have tried the likes of "(.)([hello])(.)" and "[hello]+" but they don't sort the invalid ones.
Any help would be appreciated thank you
Aucun commentaire:
Enregistrer un commentaire