s! (]) # Match and capture the next char, as long as # it's not a '>' or '/'. ! $1 # Replace with '<' or '