Regex multiple occurrences in one line

后端 未结 1 359
醉梦人生
醉梦人生 2021-01-07 15:50

How would I go about finding multiple occurrences in one line using regex in Java?

My code (regex included):

public static List getTitl         


        
相关标签:
1条回答
  • 2021-01-07 16:43
    String pattern = "rel=\"bookmark\">(.*?)</a></h2>";
    
                                          ^^   
    

    Make them non greedy.

    0 讨论(0)
提交回复
热议问题