4 lines
179 B
OCaml
4 lines
179 B
OCaml
#load "str.cma";;
|
|
let orig = "I am the original string";;
|
|
let result = Str.global_replace (Str.regexp "original") "modified" orig;;
|
|
(* result is now "I am the modified string" *)
|