Regex: To pull out a sub-string between two tags in a string

后端 未结 9 1981
情书的邮戳
情书的邮戳 2020-12-08 00:35

I have a file in the following format:

Data Data
Data
[Start]
Data I want
[End]
Data

I\'d like to grab the Data I want from between the

9条回答
  •  难免孤独
    2020-12-08 01:11

    \[start\]\s*(((?!\[start\]|\[end\]).)+)\s*\[end\]
    

    This should hopefully drop the [start] and [end] markers as well.

提交回复
热议问题