Example:
echo "100(txt),528(smbw),529(smbt),530(smbn),10115(smbs)"|\
perl -pe 's/,/\n/g'
100(txt)
528(smbw)
529(smbt)
530(smbn)
10115(smbs)
Using awk to just print the text between ().
echo "100(txt),528(smbw),529(smbt),530(smbn),10115(smbs)"|\perl -pe 's/,/\n/g'|\
awk -F"[()]" '/smb/{print $2}'
smbw
smbt
smbn
smbs
Using awk to just print the text between [].
awk -F'[][]' and awk -F'[[]]' will not work.