I have 3 strings that contain 2 fields and 2 values per string. I need a regular expression for the strings so I can get the data. Here are the 3 strings:
TTextRecordByLanguage{Text=Enter here the amount to transfer from your compulsory book saving account to your compulsory checking account; Id=55; }
TTextRecordByLanguage{Text=Hello World, CaribPayActivity!; Id=2; }
TTextRecordByLanguage{Text=(iphone); Id=4; }
The 2 fields are Text and Id, so I need an expression that gets the data between the Text field and the semi-colon (;). Make sure special symbols and any data are included.
Update ::
What i have tried…..
Pattern pinPattern = Pattern.compile("Text=([a-zA-Z0-9 \\E]*);");
ArrayList<String> pins = new ArrayList<String>();
Matcher m = pinPattern.matcher(soapObject.toString());
while (m.find()) {
pins.add(m.group(1));
s[i] = m.group(1);
}
Log.i("TAG", "ARRAY=>"+ s[i]);
I suggest a RE like this:
e.g: a returned of the last string should be
then you may eliminate Text= and ; out of string as you want the content only.