It should already do that, since all it does is grab the text between every instance of ?rm= and '