[ create a new paste ] login | about

Link: http://codepad.org/seprWfue    [ raw code | output | fork ]

C, pasted on Jun 18:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Main {

    public static void main(String[] args) {

        String str = "あいう第一倉庫えお第二倉庫かきく第一倉庫けこ";
        Pattern p = Pattern.compile("(第.+?倉庫)");
        Matcher m = p.matcher(str);

        while (m.find()) {
                System.out.println(m.group(0));
        }
    }
}

class Other {

    static String hello = "Hello";
}


Output:
1
2
3
4
Line 2: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'java'
Line 3: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'java'
Line 5: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'class'
Line 19: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Other'


Create a new paste based on this one


Comments: