How can I extract a string between matching braces in Perl?

前端 未结 7 839
再見小時候
再見小時候 2020-12-06 06:19

My input file is as below :

HEADER 
{ABC|*|DEF {GHI 0 1 0} {{Points {}}}}

{ABC|*|DEF {GHI 0 2 0} {{Points {}}}}

{ABC|*|XYZ:abc:def {GHI 0 22 0} {{Points {{         


        
7条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-06 06:45

    You're much better off using a state machine than a regex for this type of parsing.

提交回复
热议问题