# If you'd like to omit non-matching lines from the result; add ';d' to the end of the expression.
sed -E 's/(view_manage_opportunities),(view_page[^,]*)/$2,$1/gm;t' <<< "DCA,customer1,company1,SID1,cherie,cherie,\"view_page_modulepicker,explore_more_connect with people\" DCA,customer2,company2,SID2,cherie,cherie,\"view_manage_opportunities,view_page_modulepicker,back_to_opp,view_page_modulepicker\" DCA,customer1,company1,SID1,cherie,cherie,\"view_manage_opportunities,view_page_modulepicker,explore_more_connect with people\" DCA,customer1,company1,SID1,cherie,cherie,\"view_page_modulepicker\" DCA,customer1,company1,SID1,cherie,cherie,\"view_manage_opportunities\" DCA,customer4,company1,SID4,cherie,cherie,\"view_manage_opportunities,view_page_actionSource\" DCA,customer4,company1,SID4,cherie,cherie,\"view_manage_opportunities,view_page_homePage\" DCA,customer4,company1,SID4,cherie,cherie,\"view_manage_opportunities,view_page_capabilities\""
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for SED, please visit: https://www.gnu.org/software/sed/manual/html_node/The-_0022s_0022-Command.html