ページの最後には、貪欲で消極的で所有格の量指定子がどのように機能するかについての説明が試みられています: http://docs.oracle.com/javase/tutorial/essential/regex/quant.html
しかし、私は例を自分で試しましたが、完全には理解していないようです。
結果を直接貼り付けます。
Enter your regex: .*+foo
Enter input string to search: xfooxxxxxxfoo
No match found.
Enter your regex: (.*)+foo
Enter input string to search: xfooxxxxxxfoo
I found the text "xfooxxxxxxfoo" starting at index 0 and ending at index 13.
なぜ最初の reg.exp. 一致が見つからず、2 番目の一致が見つかりませんか? これら 2 つの reg.exp. の正確な違いは何ですか?