Darryl Burke wrote:And another good learning resource is http://www.regular-expressions.info/
edit
Combine these three, use a Pattern and Matcher, and you can possibly find() a match. If so, strip away that match - using substring as Darryl suggested. The length of the match is the number of characters to strip away.
Or replaceAll(regexThatMatchesTheStartOfInputFollowedByAnyNumberOfDigits, ""). No need for substring().
1) Since the OP only wants to replace the start of the line he would do better to use replaceFirst().
2) This uses Pattern and Matcher behind the scenes and the Pattern will be parsed every time it is used. Obviously this will have very little impact for a few calls but pre-compiling the Pattern can make quite a big difference if millions of lines are being processed.
3) This will not report any error if there is a line that does not have the leading decimal digits. This may or may not matter to the OP but ...