# the lack of a $var =~ here indicates # that we are matching against $_ m # this is a match regex ! # we define the extent of the regex using a ! ^ # starting at the begining of the string ( # grouping and capturing opening bracket < # matches this charachter '<' [A-Za-z0-9]+ # match any number of alphanumerics in a row > # match a literal '>' ) # closing bracket # the match between brackets captures to $1 * # accept 0 or more of the preceeding stuff # but note only first match captured into $1 # within the brackets

# match a literal '

' (<[A-Za-z0-9]+>)* # same as first but captures into $2 # the first '' sequence ([A-Za-z0-9]+) # matches sequential alphanumerics and # captures all into $3 ! # end of regex