Comparison of programming languages (string functions): Difference between revisions

Content deleted Content added
partition: Add Perl 6 section
replace: Add Perl 6 section
Line 1,993:
|-
| <code>''string'' =~ s/''find_regex''/''replace''/g<ref name="regex">The "find" string in this construct is interpreted as a [[regular expression]]. Certain characters have special meaning in regular expressions. If you want to find a string literally, you need to quote the special characters.</ref></code>
|[[Perl 5]]
|-
| <code>''string''.subst(''find'', ''replace'', :g)</code>
|[[Perl 6]]
|-
| <code>''string''.replace(''find'', ''replace'', "g") <ref>third parameter is non-standard</ref> or<br /> ''string''.replace(/''find_regex''/g, ''replace'')<ref name="regex" /></code>