Untitled

mail@pastecode.io avatar
unknown
plain_text
3 years ago
260 B
0
Indexable
Never
    public static void main(String[] args) {

        String reg ="\\d(12)";
        String txt = "123 21 1";
        Matcher m = Pattern.compile(reg).matcher(txt);
        
        while(m.find())
            System.out.println(m.group()+" ");

    }