I’m trying to write a regex to match the first attribute before both : and ! so either PASS SKIP OR FAIL
PASS : test::subtest() message
SKIP : test::subtest2() message
FAIL! : test::subtest3() message
The following regex works
([^:]*)
but it also matches the ! with FAIL!
So I tried
([^:!]*)
but that doesn’t work it doesn’t match FAIL! at all.
EDIT
sorry debugging wrong thing we need to look at full regex
if($line =~ m/([^:!]+):\s?([^:]*)::([^(]*)(\([^\)]*\))(.*)/)
Can you provide more code? It works for me: