Created
June 19, 2013 21:21
-
-
Save posulliv/5818178 to your computer and use it in GitHub Desktop.
test
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 | |
$test = '<div>(1) (4) (8) (22) (101)</div>'; | |
$pattern = '/\((\d+)\)/'; | |
$replacement = '<padraig>(${1})</padraig>'; | |
echo preg_replace($pattern, $replacement, $test) . "\n"; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment