Explorar el Código

Added space to regex in example

Smarticles101 hace 9 años
padre
commit
3136f6721c

+ 1
- 1
exercises/run-length-encoding/src/example/java/RunLengthEncoding.java Ver fichero

25
 
25
 
26
     public String decode(String encodedData) {
26
     public String decode(String encodedData) {
27
     	String decodedData = "";
27
     	String decodedData = "";
28
-        Pattern pattern = Pattern.compile("[0-9]+|[a-zA-Z]");
28
+        Pattern pattern = Pattern.compile("[0-9]+|[a-zA-Z\s]");
29
         Matcher matcher = pattern.matcher(encodedData);
29
         Matcher matcher = pattern.matcher(encodedData);
30
 
30
 
31
         while (matcher.find()) {
31
         while (matcher.find()) {