I am using Regular expression in the validation while I am trying to match the string with giving pattern, the result is not as expected
Pattern: (?:[0-9])*21([a-zA-Z0-9-]{1,15})
Expected result: I do not want to capture the letters or number until it matches 21, which means
Example: I have a string, In this string, I do not want to capture the number and letter which is before 21
i.e I don't want to capture Aabcde12345
and the expected result should be 345621822
But, the result what I am getting is just 822
because in the number 345621822
21 will reoccur and gives me the result 822
which is wrong
can someone please help me
Note: Also Please help me to update start over Question according to it `
const text = "Aabcde1234521345621822";
const regex = "(?:[0-9])*21([a-zA-Z0-9-]{1,15})";
const result = text.match(regex);
console.log(result);
// expected output: Array [""1234521345621822"", "345621822"]
`