I would like some help to finish my complex regex.
I spent some times on it and still can't figure out how I can achieve what I want
This is the text I want to parse :
Do [|83]([]?([]?([]?([]?([]?([]?([]?:))))):)([]?([]?:([]?:)):)([]?[]? :):)([]?([]?[]:):)([]?([]?[]:):)
Bo [|18] pz ([]?:)
la :
[pl]
Co [|76] pp ([]?:)
For readability, I put every text in one line only but please consider that they are not on a new line.
This is my regex so far :
([|(d*)])+(?!\
).*([%sa-zA-Z]*)((([[^[]()?:]*])+s*?([^()]*):([^()]*)))
I'm reading every combinations of [|NUMBER] ()
one by one. The process I apply on "()" depends of the NUMBER related
When I'm parsing the first time, I'm getting this which is fine :
Then, I replace the whole value after my process :
Now, I do have :
Do [|83] blabla done Bo [|18] pz ([]?:)
la :
[pl] Co [|76] pp ([]?:)
When I parse them once more, I got :
The number I got is not the good one. My question is : how can I get the closest one from the string I'm parsing after?
Thanks you for any tips
question from:
https://stackoverflow.com/questions/66054645/complex-regex-get-closest 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…