my ($match) = grep defined, $string =~ /<(ab)>|(ab)/;