fork download
  1. import java.util.regex.*;
  2.  
  3. class Main
  4. {
  5. public static void main(String[] args)
  6. {
  7. Pattern pattern = Pattern.compile("[a-z][0-9]{2}");
  8. Matcher matcher = pattern.matcher("sedfdhajkldsfakdsakvsdfasdfr30.reed.op.1xp0");
  9.  
  10. if(matcher.find()) {
  11. System.out.println(matcher.group());
  12. }
  13. }
  14. }
Success #stdin #stdout 0.03s 245632KB
stdin
Standard input is empty
stdout
r30