How to find a text consisting of line break/ paragraph break marks [Writer]?

Hallo everyone.
I can't figure out how to write a regex to find all text in between certain words. The problem I have is related to line break marks. These two words belong to different paragraphs and therefore the text I'm looking for consists of numerous line break or paragraph break marks. Here you have a sample of the text:

Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Nam convallis nisi lorem, sit amet sagittis tortor interdum a.
abc123 Integer facilisis nisl ut est commodo varius. Integer
luctus massa in ultrices scelerisque. Pellentesque

scelerisque velit ullamcorper libero tempor dapibus a nec risus.
Pellentesque vehicula, erat id mollis tempus, lorem lacus
congue dolor, id interdum est diam ac felis. xyz
Nunc a tincidunt massa, vitae placerat urna. Suspendisse potenti.

Let say the text, I'm looking for, follows abc123 and goes before xyz.

Of course I can temporally replace all line break marks with some other character and use a regex like this one for example: abc123.+xyz. It works but I would like to find a straight way to do it. Any help will be appreciated.
Best regards,
gordom

You know that you need to go to Find/Replace and choose "more options" to get to the regular expressions, correct?

Now the problem you have is something that is more of a macro and not a find/replace with "regex".

You have to find the first word and then mark that text placement. Then find the second word and mark that text placement. At that point you need to highlight all the text between those text placements.

My question is . . .
Are you going to do this many times or only once or twice?

If you so not need to do this ofter, I would use the Find option and write down the line/column/etc. of the word. Then I would search for the second word. At that point I would go back to the first word's position and highlight al the text till I get to the position of the second word.

I see no way to do something like this outside of a macro and I do not know macros so I could not tell you how to do this. I might be able to write a Pyhton script to do the work, but that would not be something you would do inside Writer.

There's no need to replace the line breaks: just search for abc123(.|\n)+xyz instead. This finds one or more of either any character or a line break bracketed by your sentinel strings. But no: I don't see any simple way to match an expression across a paragraph break.

I trust this helps.

Brian Barker

I thought it would be much easier. Writing a macro is not worth the effort in my case. I'm not going to use it very often. I think I will stick to regex and delete temporally all line brake marks to make a text one single and continuous paragraph for a moment. It requires few more operations on regex but is still easier and faster way then writing a macro.
Thank you very much for your help. Regards,
gordom

W dniu 2013-11-26 17:35, Kracked_P_P---webmaster pisze:

W dniu 2013-11-26 18:51, Brian Barker pisze:

I can't figure out how to write a regex to find all text in between
certain words. The problem I have is related to line break marks.
These two words belong to different paragraphs and therefore the text
I'm looking for consists of numerous line break or paragraph break marks.

Let say the text, I'm looking for, follows abc123 and goes before
xyz. Of course I can temporally replace all line break marks with
some other character and use a regex like this one for example:
abc123.+xyz. It works but I would like to find a straight way to do it.

There's no need to replace the line breaks: just search for
abc123(.|\n)+xyz instead. This finds one or more of either any
character or a line break bracketed by your sentinel strings.

> But no: I

don't see any simple way to match an expression across a paragraph break.

That's a pity :(.
Regards,
gordom