|
|
|
что делает метод java.util.regex.Matcher#group ?
|
|||
|---|---|---|---|
|
#18+
читаю java doc и не понимаю, что делает этот метод. автор/** * Returns the input subsequence matched by the previous match. * * <p> For a matcher <i>m</i> with input sequence <i>s</i>, * the expressions <i>m.</i><tt>group()</tt> and * <i>s.</i><tt>substring(</tt><i>m.</i><tt>start(),</tt> <i>m.</i><tt>end())</tt> * are equivalent. </p> * * <p> Note that some patterns, for example <tt>a*</tt>, match the empty * string. This method will return the empty string when the pattern * successfully matches the empty string in the input. </p> * * @return The (possibly empty) subsequence matched by the previous match, * in string form * * @throws IllegalStateException * If no match has yet been attempted, * or if the previous match operation failed */ public String group() { return group(0); } ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 03.03.2014, 20:47 |
|
||
|
что делает метод java.util.regex.Matcher#group ?
|
|||
|---|---|---|---|
|
#18+
Что такое группы, в регулярных выражениях вопроса не возникает? Вопрос только про этот метод? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 03.03.2014, 20:48 |
|
||
|
что делает метод java.util.regex.Matcher#group ?
|
|||
|---|---|---|---|
|
#18+
BlazkowiczЧто такое группы, в регулярных выражениях вопроса не возникает? теперь возникает ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 03.03.2014, 20:55 |
|
||
|
что делает метод java.util.regex.Matcher#group ?
|
|||
|---|---|---|---|
|
#18+
... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 03.03.2014, 21:00 |
|
||
|
что делает метод java.util.regex.Matcher#group ?
|
|||
|---|---|---|---|
|
#18+
Blazkowicz, осознал на уровне авторFor example, the regular expression (dog) creates a single group containing the letters "d" "o" and "g" назначение метода group непонятно. страннно, что он не описан в http://docs.oracle.com/javase/tutorial/essential/regex/matcher.html ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 03.03.2014, 21:15 |
|
||
|
|

start [/forum/topic.php?fid=59&msg=38577256&tid=2127566]: |
0ms |
get settings: |
6ms |
get forum list: |
13ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
30ms |
get topic data: |
8ms |
get forum data: |
2ms |
get page messages: |
31ms |
get tp. blocked users: |
1ms |
| others: | 211ms |
| total: | 308ms |

| 0 / 0 |
