Also, if you stick the S modifier onto the end of the regex (so it's /regex/iS) then you can check against $1- instead of $strip($1-)