s # substitute / # begin search sequence < # find a literal < (?! # negative lookahead ie find a < not followed by \/* # 0 or more / chars [bi] # then either a 'b' or and 'i' char > # then a literal > ) # end of negative lookahead .*? # 0 or more of any characters, non greedy ie minimal > # a literal > /x/ # replacement sequence is a literal 'x' char g # do all occurences