Home > database >  Regex to delete lines between double square brackets
Regex to delete lines between double square brackets

Time:08-09

Have a document with multiple multi-line sections that look like:

[[
this
is
an
example
]]

Would be great to have a regex statement that could iterate through the document and remove all the lines between the bracket sets, leaving one blank line between like

[[

]]

CodePudding user response:

find

\[\[(.*?\r\n)*?\]\]

replace with:

\[\[\r\n\]\]

enter image description here

  • Related