title: QT Regex - How to interpret a <BR> as a new line?
body: <p>I'm trying to perform some regex searches on a QTextEdit widget which has rich text format. Visually it displays properly but regex ignores the numerous <code>&lt;BR&gt;</code> line breaks and sees the entire body of text as one large single line.</p>
  <p>If I display the text as plain text and use <code>\n</code> for new lines instead, regex search works perfectly interpreting each line as it's own line. However plain text as the name suggests has no rich text formatting which I need.</p>
  <p>Is there anyway for regex to interpret an HTML line break as a new line instead of <code>\n</code> or any way I can get regex to work properly with HTML? I tried adding <code>&lt;BR&gt;\n</code> but that doesn't do anything.</p>
  <p>I'm using QTextEdit.find( QRegExp ) with PyQT5 for Python.</p>
  <hr />
  <p>Here's an example of what's happening:</p>
  <p><strong>Regex pattern</strong>: <code>Lorem.+</code></p>
  <p><strong>Text body</strong>:</p>
  <blockquote>
  <p>Lorem ipsum dolor sit amet.</p>
  <p>Consectetur adipiscing elit.</p>
  <p>sed do eiusmod tempor incididun</p>
  </blockquote>
  <p><strong>Expected match</strong>:</p>
  <pre><code>Full match  0-28    `Lorem ipsum dolor sit amet. `
  </code></pre>
  <p><strong>Actual match</strong>:</p>
  <pre><code>Full match  0-89    `Lorem ipsum dolor sit amet.Consectetur adipiscing elit.sed do eiusmod tempor incididunt`
  </code></pre>
  <p>I don't think it's the issue of the dot matching everything including new line character because when use the exact same regex pattern in plain text mode using <code>\n</code> as new lines the dot doesn't include new line characters too. This only happens when I set the text QTextEdit with HTML instead of plain text</p>