I try to extract the error number from strings like \"Wrong parameters - Error 1356\":
Pattern p = Pattern.compile(\"(\\\\d*)\");
Matcher m =
\d* Eat as many digits as possible (but none if necessary)
\d* means it matches a digit zero or more times. In your input, it matches the least possible one (ie, zero times of the digit). So it prints none.
\d+
It matches a digit one or more times. So it should find and match a digit or a digit followed by more digits.