local $_ = do { local $/ = undef; }; s[ (?<=>) # start at an '>' ([^<]+) # match all the following non '<' chars ] [$1]gx; print; __DATA__

blah blah

blah
blah