3v4l.org

run code in 200+ PHP versions simultaneously
<?php foreach(array( 'localhost/web/category/finanzas/page/2/', 'localhost/web/category/finanzas/page/3/', 'localhost/web/category/finanzas/page/2000/', 'localhost/web/category/finanzas/' ) as $val) { echo preg_replace('/page\/\d+\//', '', $val); }
Output for 5.6.0 - 7.4.6
localhost/web/category/finanzas/localhost/web/category/finanzas/localhost/web/category/finanzas/localhost/web/category/finanzas/