I’ve been looking at RegEX’s and don’t know how to combine 2 regex statements together, for example
I have this JQuery code:
$('.numeric').keyup(function () {
$(this).toggleClass('field-error', /\D/.test(this.value));
});
How do I combine this with the regex ^0 …means any number begining with zero
Any help would be greatly appreciated, Thanks
Use the pipe (
|) character to symbolize you want either the left or the right side.e.g. to match apple, orange or banana you can use: