Got a String which look like this
-FirstName (Some Random Name) -LastName (Some Random Last Name) -Age 30
I'm looking for the best and easiest way to extract the First name Last name and Age from this string. So i can store this Data in a Database.
The order of the tags can be random.
UPDATED ANSWER
As I remember indexOf is faster the regular expressions. So this is the answer for your question:
Now you will have a mapping -
flags[i] -> result[i]
. So you can build up an object for example easily.