Hi I am having a problem with 开发者_JAVA百科my while loop in the getAmatch() function
It doesn't enter the while loop in android but enters in a normal Java class.
All I can say off the top of my head without a bit more information is watch your case sensitivity on both input and patterns, and your while loop is a good piece of evidence; your matcher.find()
is simply not finding a match. As it states in the documentation
:
Parameters:
start: The index in the input at which the find operation is to begin. If this is less than the start of the region, it is automatically adjusted to that value. If it is beyond the end of the region, the method will fail.
Returns:
true if (and only if)** a match has been found.
精彩评论