我的字符串是:
/excursion/popupPortPOI.do?voyageCode=S515&tourCode=&travelOrder=A&portid=SYD
/excursion/popupPortPOI.do?voyageCode=S515&tourCode=&travelOrder=A&portid=BNE
/excursion/popupPortPOI.do?voyageCode=D520&tourCode=&travelOrder=A&portid=JFM
/excursion/popupPortPOI.do?voyageCode=D520&tourCode=&travelOrder=A&portid=SYD
/excursion/popupPortPOI.do?voyageCode=S517&tourCode=&travelOrder=A&portid=BNE
我对使用正则表达式提取航次代码感兴趣。在这种情况下,我会寻找它返回以下值:
S515
S515
D520
D520
S517