fork download
  1. string <- "0000A0000B0000C0000D0000E0000A0000"
  2. pattern <- c("XXXX")
  3. gsub("(^|[AB])0000", "\\1XXXX", string)
Success #stdin #stdout 0.25s 183680KB
stdin
Standard input is empty
stdout
[1] "XXXXAXXXXBXXXXC0000D0000E0000AXXXX"