I'm using old jQuery (1.4.2), and I cannot change this unfortunately. I must use this. But was testing and the new jQuery (3.1) made my problem, but I cannot use. So I have a problem:
I have a form input. I get this input value with jQuery:
var myInputValue = $( "#myInput").val();
For example this input's value: 22/22// , yes, double // and it's string of course.
And I have a regex pattern:
var pattern = new RegExp('[0-9A-Z]+(\/[0-9A-Z]+)*\/?', 'g');
And I use this pattern:
pattern.test(myInputValue);
console.log(pattern.test(myInputValue)); //its true, but I think its not true
And I made test. I didnt use variable for this, so directly:
console.log(pattern.test('22/22//')); //its false, and I think is false, so this is good.
So the new jQuery made my problem, but I cannot use. What do you think how to make I this task?
Thank you!