fork(1) download
  1. import java.util.*;
  2. import java.util.regex.*;
  3.  
  4.  
  5. class rTest {
  6. public static void main (String[] args) {
  7.  
  8. String s = "1234567 Mike Peloso ";
  9. Pattern p = Pattern.compile("[A-Za-z]*");
  10. Matcher m = p.matcher(s);
  11.  
  12. while (m.find()) {
  13. System.out.println(m.start());
  14. System.out.println(m.group());
  15. }
  16.  
  17. }
  18. }
Success #stdin #stdout 0.07s 380224KB
stdin
Standard input is empty
stdout
0

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27
Mike
31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52
Peloso
58

59

60

61

62

63

64

65

66

67

68