Using `java.util.regex.Matcher`, are the following expressions for `matched1` and `matched2` equivalent? Is there a simpler way to get a value for `matched`?

```
StringBuilder b = ...
Pattern p = ...
Matcher m = p.matcher(b);
m.find();

String matched1 = b.substring(m.start(), m.end());

String matched2 = m.group();

```