How to get value from string template in Java
I have a String template like this:
"Thanks, this is your value : [value]. And this is your account number :
[accountNumber]"
And i have inputs like this:
input 1 : "Thanks, this is your value : 100. And this is your account
number : 219AD098"
input 2 : "Thanks, this is your value : 150. And this is your account
number : 90582374"
input 3 : "Thanks, this is your value : 200. And this is your account
number : 18A47"
I want output like this:
output 1 : "[value] = 100 | [accountNumber] = 219AD098"
output 2 : "[value] = 150 | [accountNumber] = 90582374"
output 3 : "[value] = 200 | [accountNumber] = 18A47"
How to do that? Maybe using Regex?
No comments:
Post a Comment