There has to be a typo here, I just can't see it.
This works as expected:
$ENV{'HTTP_USER_AGENT'} eq 'Mozilla/5.0 (Linux; Android 6.0.1; SAMSUNG SM-S903VL Build/MMB29M) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/6.2 Chrome/56.0.2924.87 Mobile Safari/537.36' ||
while this is matching everything:
$ENV{'HTTP_USER_AGENT'} =~ #Mozilla/5.0 (Linux; Android 6.0.1; SAMSUNG SM-S903VL Build/MMB29M) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/[^A-Za-z]+ Chrome/[^A-Za-z]+ Mobile Safari/537.36# ||
They should be the same, I just changed the
6.2 and
56.0.2924.87 to
[^A-Za-z]+. Of course, I realize that the unescaped . in the second one matches any character, but I'm not too concerned about that right now; I'll go back and escape it once this issue is figured out.
I left the || at the end just in case it's relevant; this is a snippet of a larger if-else statement, but this is the only part of it giving me attitude.
TIA!