replace

# given qr(test)

$re->replace('this is a test', 'drill');
$re->replace('test 1 test 2 test 3', 'drill', 'gi');

The replace method performs a regular expression substitution on the given string. The first argument is the string to match against. The second argument is the replacement string. The optional third argument might be a string representing flags to append to the s///x operator, such as 'g' or 'e'. This method will always return a Data::Object::Replace object which can be used to introspect the result of the operation.

replace(Str $arg1, Str $arg2) : StrObject

method

5 POD Errors

The following errors were encountered while parsing the POD:

Around line 10:

Unknown directive: =name

Around line 14:

Unknown directive: =usage

Around line 21:

Unknown directive: =description

Around line 30:

Unknown directive: =signature

Around line 34:

Unknown directive: =type