If I have :
Here is my regular expression where I had to separate the mime-type (image/jpg) as well.
^data:(?(?\w+)\/(?\w+));(?\w+),(?.*)