Community Patterns

Community Library Entry

1

Regular Expression
Created·2014-10-07 23:13
Flavor·PCRE (Legacy)

/
Foo\n=+\n((.+)(?:\n-+\n))+
/
g
Open regex in editor

Description

Hi there,

I try to learn and improve my regex knowledge... I want to fetch all lines below the "="-line and between the "-"-lines and access them via $1 - $n. Is this possible? Or should I fetch the whole string below the "="-line and the last "-"-line, then seperate the lines after that in another regexp? How can I find the end then?

Thank you in advance for your help.

Submitted by Floffy