Regular expressions: Difference between revisions

Added Oz solution.
(→‎{{header|Raven}}: Added REBOL example.)
(Added Oz solution.)
Line 419:
(Pcre.replace ~pat:"original" ~templ:"modified" "I am the original string")
;;</lang>
 
=={{header|Oz}}==
<lang oz>declare
[Regex] = {Module.link ['x-oz://contrib/regex']}
String = "This is a string"
in
if {Regex.search "string$" String} \= false then
{System.showInfo "Ends with string."}
end
{System.showInfo {Regex.replace String " a " fun {$ _ _} " another " end}}</lang>
 
=={{header|Perl}}==
Anonymous user