Ayesha Fathima

Ayesha Fathima

  • NA
  • 184
  • 29.9k

Separate base64 from String

Jan 4 2018 8:23 AM
Hi,
I have my TinyMCE field,from that iam getting the below "String" value.From that I need to take only encoded base64 part.How can i do it?
Example
var String="<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUh=" /></p>
<p><img src="data:image/png;base64,/9j/4AAQSkZJRgABAQAAAQABAA=" /><br /><br />---------- Reply message ----------<br />From: [email protected]<br />Date: 04/01/2018 02:50:19 PM<br />Subject: Ticket No: gh<br />To: [email protected]<br />";
output will be
iVBORw0KGgoAAAANSUh=
/9j/4AAQSkZJRgABAQAAAQABAA=

Answers (1)