I want to replace part of a string using haskell. For example I have a string "LP FACTOR PLUS FACTOR RP MULT FACTOR" and I want to replace "FACTOR PLUS FACTOR" with "TERM" so my new string will be "LP TERM RP MULT FACTOR"
any help would be appreciated.