package com.pedro.stringcalculator;

import java.util.LinkedList;
import java.util.List;

/**
 * Class created to work as a number extractor. This class will receive a string with some numbers inside and will
 * extract it in a number collection.
 *
 * @author Pedro Vicente Gómez Sánchez.
 */
class NumberExtractor {

    public List<Integer> extract(final String stringToAnalyze) {
        List<Integer> numbers = new LinkedList<Integer>();
        if (stringToAnalyze != null && !stringToAnalyze.isEmpty()) {

        }
        return numbers;
    }
}

@@ -81,16 +81,80 @@
 il.List;
+%0Aimport java.util.regex.Matcher;%0Aimport java.util.regex.Pattern;
 %0A%0A/**%0A *
@@ -372,24 +372,535 @@
 xtractor %7B%0A%0A
+    /*%0A     * Constants%0A     */%0A%0A    private static final String ONE_DIGIT_OR_MORE_REG_EX = %22-?%5C%5Cd+%22;%0A    private static final Pattern numberPattern = Pattern.compile(ONE_DIGIT_OR_MORE_REG_EX);%0A%0A    /*%0A     * Public methods%0A     */%0A%0A    /**%0A     * Analyze the string passed as parameter searching numbers and return a list with all of them%0A     *%0A     * @param stringToAnalyze can contains different separators and numbers with more than one digit.%0A     * @return a List%3CInteger%3E with the numbers found%0A     */%0A
     public L
@@ -974,23 +974,22 @@
 nteger%3E 
-numbers
+result
  = new L
@@ -1079,16 +1079,603 @@
 ty()) %7B%0A
+            result = getNumbersUsingRegEx(stringToAnalyze);%0A        %7D%0A        return result;%0A    %7D%0A%0A    /*%0A     * Auxiliary methods%0A     */%0A%0A    private List%3CInteger%3E getNumbersUsingRegEx(String string) %7B%0A        Matcher matcher = numberPattern.matcher(string);%0A        return extractNumbersFromMatcher(matcher);%0A    %7D%0A%0A    private LinkedList%3CInteger%3E extractNumbersFromMatcher(Matcher matcher) %7B%0A        LinkedList%3CInteger%3E numbers = new LinkedList%3CInteger%3E();%0A        while (matcher.find()) %7B%0A            int number = Integer.parseInt(matcher.group());%0A            numbers.add(number);
 %0A       
@@ -1707,10 +1707,12 @@
 ;%0A    %7D%0A
+%0A%0A
 %7D%0A

Implement the most important method of NumberExtractor based on regular expressions. GREEN