Page 1 of 1
					
				About Question enthuware.ocpjp.v7.2.1417 :
				Posted: Sat Jul 06, 2013 7:26 pm
				by renatumb
				Why does it return 
 12 "" 
Because the last letter is "l" so when it returns 
 11 "" 
 there is no anything else to return
 
			 
			
					
				Re: About Question enthuware.ocpjp.v7.2.1417 :
				Posted: Sun Jul 07, 2013 6:40 am
				by admin
				That's a good question and I am not really sure why 

The javadoc says, the start method returns the "start index of the previous match" and "The index of the first character matched". 
My guess would be that it is trying to return the index of the boundary.
-Paul.
 
			 
			
					
				Re: About Question enthuware.ocpjp.v7.2.1417 :
				Posted: Tue Jan 31, 2017 12:42 am
				by sir_Anduin@yahoo.de
				i dont understand, if it says:
find()
Attempts to find the next subsequence of the input sequence that matches the pattern.
why does it find anything after "wow"?
nothing after it matchers the pattern [wow]*
 
			 
			
					
				Re: About Question enthuware.ocpjp.v7.2.1417 :
				Posted: Tue Jan 31, 2017 1:54 am
				by admin
				That is indeed a mystery to me. It doesn't print anything in Java 8. But the answer is correct for Java 7.
-Paul.