RosettaCodeData/Task/Regular-expressions/Oz/regular-expressions.oz

9 lines
269 B
Text
Raw Permalink Normal View History

2013-04-10 23:57:08 -07:00
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}}