Hi All,
I have the following code snippet:
Pattern p = Pattern.compile("(C|c)arriage return to continue:");
Matcher matcher = p.matcher(screenText);
screenText = matcher.replaceAll("");
Please note the the screenText is a
string.
Lets take the following scenario, where the screentext is as follows:
"abcdef
Carriage return to continue:
cdefgh
carriage return to continue:
lmnop"
From the above code snippet, the output will be:
"abcdef
cdefgh
lmnop"
The output that I expect is:
"abcdef
cdefgh
lmnop"
Note that the output that I'm expecting does not have blank lines.. I want to remove the blank lines as well as the "carriage return to continue:" string!
Can anyone help me in getting the output that I expect! Please... Please.. help me..
Regards,
Kamal