Here is my (French bricolage; o)), imagine the file c: \ temp \ gorille.txt:
C'est à travers de larges grilles, Que les femelles du canton, Contemplaient un puissant gorille, Sans souci du qu'en-dira-t-on. Avec impudeur, ces commères Lorgnaient même un endroit précis Que, rigoureusement ma mère M'a défendu de nommer ici... Gare au gorille !...
Here is the text between "canton" and "endroit"
PS > (((Get-Content -Path C:\temp\gorille.txt) -join "£" | Select-String -Pattern "(?=canton)(.*)(?<=endroit)").matches[0].groups[0].value) -split "£" canton, Contemplaient un puissant gorille, Sans souci du qu'en-dira-t-on. Avec impudeur, ces commères Lorgnaient même un endroit
I join all the lines with the special character "E" (select onather one if used), then use the @Alex Aza pattern in CmdLet Select-String , then split again.
source share