Hi all
I have a csv which is being exported as an email attachment, I am then using Power Automate to get the attachment content to Base64 then convert it to a String. I am using this data to add a row to a table in excel by splitting on line breaks in order to create an array by using the function
split(outputs('Remove_line_breaks_within_content'),decodeUriComponent('%0D%0A'))
The problem I am having is that some of the data might have line breaks in them. I need a way to remove/replace line breaks if they are within a set of speech marks. I have tried using regex but haven't got anywhere.
replace(outputs('Base64_To_String'),'(\".*?)\r\n(.*?\")', '$1$3')
Data example:
"Infocard","Number","Title","Vault"
"CPR","12","Example Data
","TAG"
"CRQ","12","Example Data without line break","TAG"
Is there another way I can do this which will ensure that line breaks that occur within the Title field are removed but they remain at the end of each row?
Thanks
Grant