Text : “aaaa”
Pattern : “aa”
then will two match: aa(0,1), aa(2,3)
if I want three match : aa(0,1), aa(1,2), aa(2,3). (I believe this is a classical problem I don’t know how to describe this :'( )
How can I do it in java or python or others?
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.
See this code here:
It outputs:
This is basically how you manipulate from where to search the next match in java. Hopefully this will help you.