/** * @dataProvider regexReplaceProvider() */ public function testRegexReplace($expected, $str, $pattern, $replacement, $options = 'msr', $encoding = null) { $result = S::regexReplace($str, $pattern, $replacement, $options, $encoding); $this->assertInternalType('string', $result); $this->assertEquals($expected, $result); }
public function regexReplace($string, $pattern, $replacement, $options = 'msr') { return Stringy::regexReplace($string, $pattern, $replacement, $options); }