:
[A-Z][a-z]*\.?\s+[a-z][a-z]+(\s*[a-z]+)*
- (\s*[a-z]+)*, . , String.matches(), , , ( Matcher).
(\s*[a-z]+)*:
inputstringinputstring;
(Repetition 1)
\s*=(empty)
[a-z]+=inputstringinputstring
FAILED
Backtrack [a-z]+=inputstringinputstrin
(Repetition 2)
\s*=(empty)
[a-z]+=g
FAILED
(End repetition 2 since all choices are exhausted)
Backtrack [a-z]+=inputstringinputstri
(Repetition 2)
\s*=(empty)
[a-z]+=ng
FAILED
Backtrack [a-z]+=n
(Repetition 3)
\s*(empty)
[a-z]+=g
FAILED
(End repetition 3 since all choices are exhausted)
(End repetition 2 since all choices are exhausted)
Backtrack [a-z]+=inputstringinputstr
. T(n), n . T(n) = Sum [i = 0..(n-1)] T(i). T(n + 1) = 2T(n), , !
* + , . , .
, (\s+[a-z]+\s*)* , , , . b^d, b - ( 1), d - . , ( Englsh , ), .