public class Practice {
public static void main(String... args){
Pattern p = Pattern.compile("\\d*");
Matcher m = p.matcher("a1");
boolean b = false;
while(b = m.find())
System.out.println("Hello");
}
}
It prints,
Hello
Hello
Hello
WHY ??
and another question ...
%b = boolean
%c = ?
%d = digit
%f = float ?
%s = String
* please dont tell me that is because "*" or "?" is greedy because i don't understand what "greedy" means.
* don't tell me go read the javadoc (don't be mean
)
Thanks a lot !
[ June 26, 2008: Message edited by: podonga poron ]