Added preg_match condition for pagination numbers