summaryrefslogtreecommitdiff
path: root/ext/pcre/tests/preg_replace_basic.phpt
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2013-06-10 14:31:57 -0700
committerStanislav Malyshev <stas@php.net>2013-06-10 14:31:57 -0700
commit8ac131503ddeee5b1de8225510f9d2927e903620 (patch)
treef02250a3e6cb8712adc02d23eb2e1b0f5dd3b3fd /ext/pcre/tests/preg_replace_basic.phpt
parentd7c943e2a1f54c445276fc77369918f33c4f6cce (diff)
parent4427d1dcfdca5e5e4b7e1b1226cf4771cc82389f (diff)
downloadphp-git-8ac131503ddeee5b1de8225510f9d2927e903620.tar.gz
Merge branch 'PHP-5.5'
* PHP-5.5: Merge branch 'pull-request/341' Merge branch 'pull-request/341'
Diffstat (limited to 'ext/pcre/tests/preg_replace_basic.phpt')
-rw-r--r--ext/pcre/tests/preg_replace_basic.phpt2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/pcre/tests/preg_replace_basic.phpt b/ext/pcre/tests/preg_replace_basic.phpt
index 33fb2d4a8a..6962bce255 100644
--- a/ext/pcre/tests/preg_replace_basic.phpt
+++ b/ext/pcre/tests/preg_replace_basic.phpt
@@ -11,7 +11,7 @@ var_dump($string);
var_dump(preg_replace('<- This is a string$>', 'This shouldn\'t work', $string)); //tries to find '- This is a string' at the end of a string but can't so replaces nothing and prints the unchanged $string.
var_dump(preg_replace('<[0-35-9]>', '4', $string)); //finds any number that's not 4 and replaces it with a 4 ('444444444')
var_dump(preg_replace('<\b[hH]\w{2,4}>', 'Bonjour', $string)); //finds h or H at the beginning of a word followed by 2-4 characters and replaces it with Bonjour (i.e. Hello -> Bonjour) (was finding the 'his' in This and replacing it)
-var_dump(preg_replace('<(\w)\s*-\s*(\w)>', '\\1. \\2', $string)); //finds dashes with an indefinate amount of whitespace around them and replaces them with a full stop precedeby no spaces and followed by one space
+var_dump(preg_replace('<(\w)\s*-\s*(\w)>', '\\1. \\2', $string)); //finds dashes with an indefinite amount of whitespace around them and replaces them with a full stop precedeby no spaces and followed by one space
var_dump(preg_replace('<(^[a-z]\w+)@(\w+)\.(\w+)\.([a-z]{2,}$)>', '\\1 at \\2 dot \\3 dot \\4', 'josmessa@uk.ibm.com')); //finds the e-mail address and replaces the @ and . with "at" and "dot" (uses backreferences) ('josmessa at uk dot ibm dot com')
?>