所以我爲了解析以下字符串在嘗試用正則表達式:正回顧後發正則表達式明顯的最大長度
INFO: Device 6: Time 20.11.2015 06:28:00 - [Script] FunFehlerButton: Execute [0031 text]
and
INFO: Device 0: Time 09.12.2015 03:51:44 - [Replication] FunFehlerButton: Execute
and
INFO: Device 6: Time 20.11.2015 06:28:00 - FunFehlerButton: Execute
我試圖用正則表達式是:
(?<=\\d{1,2}:\\d{2}:\\d{2} -).*
和
(?<=\\[\\w*\\]).*
其中第一個正確運行,第二個正確運行。
我的目標是獲得文本「FunFehlerButton:Execute ...」。
我希望有人能向正確的方向暗示我。
嘿,有一個頁面[txt2re](http://txt2re.com/),你可以從一個字符串創建正則表達式。 – Graphican0
所以:https://regex101.com/r/mF7kH7/1 –
@JorgeCampos,他也想在最後得到一些小點。 – trincot