extract substring in java using regex

前端 未结 7 1631
走了就别回头了
走了就别回头了 2020-12-10 22:25

I need to extract \"URPlus1_S2_3\" from the string:

\"Last one: http://abc.imp/Basic2#URPlus1_S2_3,\" 

using regular expressi

相关标签:
7条回答
  • 2020-12-10 23:31

    Since it's the first time you use regular expressions I would suggest going another way, which is more understandable for now (until you master regular expressions ;) and it will be easily modified if you will ever need to:

    String yourPart = new String().split("#")[1];
    
    0 讨论(0)
提交回复
热议问题