Created
January 10, 2014 07:59
-
-
Save anytizer/8348385 to your computer and use it in GitHub Desktop.
Cleanups the digits surrounded by braces
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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