I have a image data from which I need to remove the following substring
data:image/jpeg;base64,
from the string
data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD......
data:image/png;base64......
data:image/;base64
and then I am thinking of doing something like the following
imageData = imageData.replace("regex", "");
return Base64.decodeBase64(imageData.getBytes());
I want to know the regex first and also want to know whether calling
imageData.getBytes()
will work out or not...