Question: sorry, I need some help finding the right regular expression for this.
Basically I want to recognize via regex if the following format is in a string:

artist - title (something)

examples:

```
"ellie goulding - good gracious (the chainsmokers remix)"
"the xx - you got the love (florence and the machine cover)"
"neneh cherry - everything (loco dice remix)"
"my chemical romance - famous last words (video)"

```

I have been trying but haven't been able to find the right regular expression.

```
regex = "[A-Za-z0-9\s]+[\-]{1}[A-Za-z0-9\s]+[\(]{1}[\s]*[A-Za-z0-9\s]*[\)]{1}"

```

help please!

Answer: 
Well for storing images you can try this

* If you want to save images which are not coming from server and are stored in drawable/mipmap folder just store their id like

initialValues.put(COLUMN\_IMAGE, R.mipmap.demp);
* And if they are coming from server or api call just save their url and load them using any library such as picaso or something.

I tried the same in one of my app it worked.
Convert your image into base64 encoded string and then insert that string into database:

```
Bitmap bm = BitmapFactory.decodeFile("<path to your image>");
ByteArrayOutputStream baos = new ByteArrayOutputStream();  
bm.compress(Bitmap.CompressFormat.JPEG, 100, baos);  
byte[] b = baos.toByteArray(); 
String encodedString = Base64.encodeToString(b, Base64.DEFAULT);  

```

When your fetch the string then convert it like this:

```
byte[] b= Base64.decode(encodedString , Base64.DEFAULT);
Bitmap decodedByte = BitmapFactory.decodeByteArray(b,0,b.length); 

```