'<p>Complete the attached lab and submit via dropbox</p>\r<p><a href="" href="https://owncloud.porterchester.edu/HVACR/PCI_GasHeat/GasElectrical/HVACR1114_LAB_13A.pdf" target="_blank">https://owncloud.porterchester.edu/HVACR/PCI_GasHeat/GasElectrical/HVACR1114_LAB_13A.pdf" title="Lab 13A">Lab 13A<\a>'
Need the final string to separate the "LAB_13A.pdf" from the rest of the URL by inserting a "&file=" in front of it. The final string should look like:
'<p>Complete the attached lab and submit via dropbox</p>\r<p><a href="" href="https://owncloud.porterchester.edu/HVACR/PCI_GasHeat/GasElectrical/&file=HVACR1114_LAB_13A.pdf" target="_blank">https://owncloud.porterchester.edu/HVACR/PCI_GasHeat/GasElectrical/&file=HVACR1114_LAB_13A.pdf" title="Lab 13A">Lab 13A<\a>'
I have tried something like:
update pcilms_assign set intro=regexp_replace(intro, '/([^/]*)\" title=$', '&files=\1') where intro like '%https://owncloud.porterchester.edu%' and course=18 and id=55413;
and the result puts the &file= in the wrong place (at the end of the whole string).
Any suggestions?
Thanks!
-Chris