StringBuffer find ‘start’ and ‘end’ and write anything between them
example:
text1
text2
start
text3
text4
end
text5
can i just print out of StringBuffer text3 and text4′ Text that is between ‘start’ and ‘end’
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Assumming you have a
StringBuffer sbthat already contains the text:Note that this finds text between
"start"and"end"as you asked for in your question. However if the text in theStringBufferhas line breaks, you might actually want to search for text between"start\n"and"end\n".