-- Paragraph1: text Paragraph2: text1 text2 text3 Paragraph3: text --
Ok, now I want extract everything between Paragraph2 and Paragraph3. But I have small problem, I cant use 'Paragraph2:\s+(.*)\s+Paragraph3:/is' because I dont know name of next Paragraph (Paragraph3) - it could be Paragraph1,2,3 and so on... Hint: Name of Paragraph has ':' at end of line, it is five (5) spaces from start of line, extracted text has always nine (9) spaces from start. Any hints on this? It should be nice regexp, if it is possible... (sorry for my poor English and this is my first post here:)
Thanks for any help! (DelimMatch is the solution?)
P.S. My first question has some errors, so I will corect them: Paragraph[123] should be for example 'Name', 'Address', 'City' and so on (many possibilities, sometimes are all not of them shown!) I cant use 'scalar range operator' nor (.*) because I dont know name of end paragraph. Maybe the best solution is not the find "hard regexp", but real names of paragraphs and after create regexp.
Janitored by davido: paragraph tags added to reflect the layout of the text as posted.
In reply to Regexp help, multiple lines by 2ge
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |