Why don't you try to write a function based on Integer.parseInt(String obj)
? The function could accept as parameter your String object, and then tokenize the String and use Integer.parseInt(String obj)
to extract the number from the "lucky" substring...
Javadoc of Integer.parseInt(String obj)