I’m trying to extract a chunk of text from my payload and append some text to it. Basically, it is a certificate file that I’m reading using a modem using AT command. I’ll be extracting the contents of the certificate in 4 batches using AT command.
My response for each AT command is something like this:
I only want to extract the part within the quotes. +CSIM:201 is actually the response to the command and the text length.
I’m trying to create a single file with all 4 outputs of AT command and append text to it. So my final output should look something like this:
-----BEGIN CERTIFICATE----- MIIDWTCCAkGgAwIBAgIUfsYH/vNNh3zb5bBUdqBQe3Z+izEwDQYJKoZIhvcNAQEL BQAwTTFLMEkGA1UECwxCQW1 -----END CERTIFICATE-----
How can I do this with nodered? I can handle the AT command part, I need help on extracting the contents of the file within the quotes, combining 4 outputs into a single file, append BEGIN CERTIFICATE and END CERTIFICATE on top and bottom of the extracted text.