Skip to content

Instantly share code, notes, and snippets.

@posulliv posulliv/test.php
Created Jun 19, 2013

Embed
What would you like to do?
test
<?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
You can’t perform that action at this time.