#!/bin/bashecho "F1,F2,[as1,as2],[as3,as4]" | perl -lpe 's/(\[[^][]+])/$1=~s#,#|#gr/ge'
Standard input is empty
F1,F2,[as1|as2],[as3|as4]
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!