Skip to content

Instantly share code, notes, and snippets.

@anytizer
Created January 10, 2014 07:59
Show Gist options
  • Save anytizer/8348385 to your computer and use it in GitHub Desktop.
Save anytizer/8348385 to your computer and use it in GitHub Desktop.
Cleanups the digits surrounded by braces
<?php
$string="Invalid (0) entries";
# Removes the braces and digits like "(10)" from the string without the quotations
$string = preg_replace('/\(\d+\)/', '', $string);
echo $string;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment