I want to read Object from string expression. eg:
I have following string:
(3:2,1)
or
(3:null,1)
now I want to read Object1=3; Object2=2; Object3=1 or
Object1=3; Object2=null; Object3=1.
How can I read it in Java.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I am usually not a big fan of regular expressions, but this is a perfect example of where the proper application of a regular expression is simpler and most importantly easier to maintain than other String manipulation based solutions.
As per your requirements the expected output looks like