RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Multi-Line Start | Middle | End construct
Expression
^START(?=(?:.(?!END|START))*MIDDLE).*?END[^\n]+
Description
A regex that hits on a multi-line sequence that starts with a START phrase on a line, and ends with an END phrase on a different line, which contains a MIDDLE phrase on a line between the START and END lines. Needs Multi-Line and Single-Line options enabled in PCRE.
Matches
http://gyazo.com/ffa94f5e0cac61a72f0264fceace4a1f.png
Non-Matches
http://gyazo.com/ffa94f5e0cac61a72f0264fceace4a1f.png
Author Rating: The rating for this expression. Tod Wulff
Source http://regexadvice.com/forums/thread/33836.aspx
Your Rating
Bad Good

Enter New Comment

Title

Name

Comment

Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Copyright © 2001-2024, RegexAdvice.com | ASP.NET Tutorials