Getting the text that follows after the regex match

后端 未结 5 1736
你的背包
你的背包 2020-11-22 11:33

I\'m new to using Regex, I\'ve been going through a rake of tutorials but I haven\'t found one that applies to what I want to do,

I want to search for something, but

5条回答
  •  闹比i
    闹比i (楼主)
    2020-11-22 12:09

    You just need to put "group(1)" instead of "group()" in the following line and the return will be the one you expected:

    System.out.println("I found the text: " + matcher.group(**1**).toString());
    

提交回复
热议问题