I have hundreds of text files with contents of this type (these are .txt content files from Kirby CMS):
Attributes:
- attribute: ''
----
Materials:
-
material: ""
price: 0
available: 'true'
default: 'true'
material_variations:
-
variations:
-
option:
variation: —
price: "0"
variation_available: 'true'
-
option:
variation: ""
price: "0"
variation_available: 'true'
----
Price: 0
I want to remove the part from Materials: to the next ----, so the above snippet becomes:
Attributes:
- attribute: ''
----
Price: 0
I am searching for a regular expression to achieve that, but some things that I thought could maybe work (e.g. \bMaterials\b[^]\b----\b), produce an error in VSCode.