1
我希望這是一個簡單的問題,但我仍然在圍繞着羣組。正則表達式 - 組,需要[this:andthis] from一個字符串
我有這個字符串:this is some text [propertyFromId:34] and this is more text
,我會更喜歡他們。我需要獲取括號內的內容,然後是冒號左側僅包含alpha的文本,冒號右側包含整數。
所以,全場比賽:propertyFromId:34
,1組:propertyFromId
,第2組:34
這是我的出發點(?<=\[)(.*?)(?=])