I cant figure out preg_replace at all, it just looks chinese to me, anyway I just need to remove \"&page-X\" from a string if its there.
&page-X
X
preg_replace('/&page-\d+/', '', $string)
Useful information:
Using Regular Expressions with PHP
http://articles.sitepoint.com/article/regular-expressions-php