fork(2) download
  1. #!/bin/bash
  2. echo "F1,F2,[as1,as2],[as3,as4]" | perl -lpe 's/(\[[^][]+])/$1=~s#,#|#gr/ge'
Success #stdin #stdout 0s 19632KB
stdin
Standard input is empty
stdout
F1,F2,[as1|as2],[as3|as4]