m{ (]*>[^\x90\x8F]*) [\x90\x8F] # your target characters... [^\x9D]* # anything but the terminator, # including \x90 and \x8F \x9D # the terminator }xs