title: Is there a way to figure out poetry style of text on a text/markdown file?
body: <p>There is a markdown/text file that has poetical phrases in between normal paragraphs, like so:</p>
  
  <pre><code>Mr. Lewes reaches this conclusion: "If, therefore, we reflect what a poem _Faust_ is, and that it contains almost every variety of style and metre, it will be tolerably evident that no one unacquainted with the original can form an adequate idea of it from translation,"  which is certainly correct of any translation wherein something of the rhythmical variety and beauty of the original is not retained. That very much of the rhythmical character may be retained in English, was long ago shown by Mr. Carlyle,  in the passages which he translated, both literally and rhythmically, from the _Helena_ (Part Second). In fact, we have so many instances of the possibility of reciprocally transferring the finest qualities of English and German poetry, that there is no sufficient excuse for an unmetrical translation of _Faust_. I refer especially to such subtile and melodious lyrics as "The Castle by the Sea," of Uhland, and the "Silent Land" of Salis, translated by Mr. Longfellow; Goethe's "Minstrel" and "Coptic Song," by Dr. Hedge; Heine's "Two Grenadiers," by Dr. Furness and many of Heine's songs by Mr Leland; and also to the German translations of English lyrics, by Freiligrath and Strodtmann. 
  
  &gt; Life of Goethe (Book VI.).
  
  &gt; Mr. Lewes gives the following advice: "The English reader would perhaps best succeed who should first read Dr. Anster's brilliant paraphrase, and then carefully go through Hayward's prose translation." This is singularly at variance with the view he has just expressed. Dr. Anster's version is an almost incredible dilution of the original, written in _other_ metres; while Hayward's entirely omits the element of poetry.
  
  &gt; Foreign Review, 1828.
  
  &gt; When Freiligrath can thus give us Walter Scott:—
  
  
  "Kommt, wie der Wind kommt,  
  Wenn Wälder erzittern  
  Kommt, wie die Brandung  
  Wenn Flotten zersplittern!  
  Schnell heran, schnell herab,  
  Schneller kommt Al'e!—  
  Häuptling und Bub' und Knapp,  
  Herr und Vasalle!"  
  </code></pre>
  
  <p>I want to place three ``` above and below all such poetical constructs on the markdown so that the output to HTML has the poetry inside a <code>&lt;pre&gt;</code> tag. Like this:</p>
  
  <pre><code>```
  "Kommt, wie der Wind kommt,  
  Wenn Wälder erzittern  
  Kommt, wie die Brandung  
  Wenn Flotten zersplittern!  
  Schnell heran, schnell herab,  
  Schneller kommt Al'e!—  
  Häuptling und Bub' und Knapp,  
  Herr und Vasalle!"  
  ```
  </code></pre>
  
  <p>Am wondering if there's a regex to match such patterns on a text file reliably? </p>
  
  <hr>
  
  <p>Another situation:</p>
  
  <p>I sometimes have following formatting to identify poetical prose:</p>
  
  <pre><code>abra ca dabra op
    lorem ipsum holy this 
  line doesn't have 
    an indent but it's in
  continuity of the 
    structure that sits together.
  </code></pre>