fork(1) download
  1. a <- "a, b, c (1, 2, 3), d, e (4, 5)"
  2. gsub(",(?=[^()]*\\))", ";", a, perl=T)
  3.  
Success #stdin #stdout 0.29s 22840KB
stdin
Standard input is empty
stdout
[1] "a, b, c (1; 2; 3), d, e (4; 5)"