T
T
trapce2017-09-05 14:48:55
Facebook
trapce, 2017-09-05 14:48:55

How to get data from string using reg. expressions??

Hello everyone. I have a string like "Mr=Turd1 Mrs=Turd2". I need to parse the string by values ​​relative to the = sign. That is, to make it work for me, something like String info = "Mr=Turd1 Mrs=Turd2" -> String kaka1 = "Turd1";String kaka2 = "Turd2";

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
mr_serg77, 2017-09-05
@trapce

"split" method
String[] subStrings = str1.split("=");
de srt1 = "Mr=Turd1
Get two substrings separately.

T
trapce, 2017-09-05
@trapce

Get values ​​after equal signs

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question