I have different REGEX and I want to use them in following code.
The idea is that for ALL Regex the result.pop is triggered, but somehow II does not work and | also not. And only the first REGEX (in below example [2] is read and executed only.
Why use 3 different regex though? You can combine all to one, what exactly is it you want to match? Also note that match doesn’t return a boolean, it returns the matched value.