Last active
December 16, 2015 10:49
-
-
Save dcsg/5423255 to your computer and use it in GitHub Desktop.
Revisions
-
dcsg revised this gist
Apr 19, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ <?php $expression = 'here we got a number 23 % and so on'; $pattern = '/(\d+ %)/'; $replacement = '<b>$1</b>'; echo preg_replace($pattern, $replacement, $expression); -
dcsg created this gist
Apr 19, 2013 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ <?php $expression = 'here we got a number 23 % and so on'; $pattern = '/(\d+ %)/i'; $replacement = '<b>$1</b>'; echo preg_replace($pattern, $replacement, $expression);