fork(5) download
  1. import java.util.*;
  2. import java.lang.*;
  3. import java.io.*;
  4. import java.util.regex.*;
  5.  
  6. class Ideone
  7. {
  8. public static void main (String[] args) throws java.lang.Exception
  9. {
  10. String subject = "1Apple 123Banana 64000Cherry";
  11. Pattern regex = Pattern.compile("(?<=\\d+)\\w+");
  12. Matcher regexMatcher = regex.matcher(subject);
  13. while (regexMatcher.find()) {
  14. System.out.println(regexMatcher.group());
  15. }
  16.  
  17. } // End main
  18. } // End Ideone
Success #stdin #stdout 0.07s 380160KB
stdin
Standard input is empty
stdout
Apple
23Banana
4000Cherry