P
Peekachu
Hi,
My program has to deal with a lot of text of the pattern:
"Name=userLocale", "Value=English", ENDITEM
I need to do two things:
1> Check if the text matches a certain pattern.
2> If there is a pattern match, extract the attribute value parts
('userLocale' and 'English', in the text above) of the text into
Strings or a String array.
The first part is easy to do using the Pattern and Matcher classes. I
am struggling with the second part. It is easy to do it using the
String class methods such as 'split' and 'substring' but I was looking
for a more elegant way to do this, since I need to do this operation in
several places throughout my program.
Thanks,
Peekachu
My program has to deal with a lot of text of the pattern:
"Name=userLocale", "Value=English", ENDITEM
I need to do two things:
1> Check if the text matches a certain pattern.
2> If there is a pattern match, extract the attribute value parts
('userLocale' and 'English', in the text above) of the text into
Strings or a String array.
The first part is easy to do using the Pattern and Matcher classes. I
am struggling with the second part. It is easy to do it using the
String class methods such as 'split' and 'substring' but I was looking
for a more elegant way to do this, since I need to do this operation in
several places throughout my program.
Thanks,
Peekachu