mediawiki-extensions-AbuseF.../tests/parserTests/str-replace-regexp.t
proc 1d1215bafb
Add support for regex string replacements.
Bug: T285468
Change-Id: I25f8ad1b58cc10f4c6f6ef5ebab99fe58ec71b1e
2022-04-20 18:38:24 +01:00

4 lines
195 B
Perl

str_replace_regexp( "foobarbaz", "bar", "" ) === 'foobaz' &
str_replace_regexp( "foo1bar1baz", "\d", "" ) === 'foobarbaz' &
str_replace_regexp( "foobarbaz", "(bar)", "$1baz" ) === 'foobarbazbaz'