title: Regex to capture dialog in Virginia Woolf's novel The Waves?
body: <p>A bunch of us English grad students are studying dialog in <a href="http://www.gutenberg.net.au/ebooks02/0201091.txt" rel="nofollow">Virginia Woolf's novel The Waves</a>, and I've been trying to mark up the novel in TEI. To do this, it would be useful to write a regex that captures the dialog. Thankfully, The Waves is extremely regular, and almost all the dialog is in the form: </p>
  
  <p>'Now they have all gone,' said Louis.  'I am alone.  They have gone into the house for breakfast,' </p>
  
  <p>But could continue for several paragraphs. I'm trying to write a regex to match all the paragraphs of a given speaker. </p>
  
  <p>This is discussed briefly in <a href="http://cforster.com/2013/02/reading-the-waves-with-stephen-ramsay/" rel="nofollow">Chris Foster's blog post</a>, where he suggests something like <code>/'([\^,]+,)' said Louis, '(*)'/</code>, although this would only match single paragraphs, I think. This is how I'm thinking through it: </p>
  
  <ul>
  <li>For every paragraph containing the text "said Louis" (or any other character's name) in the first line of the paragraph, match every line until reaching another character's speech, i.e. "said Rhodha."  </li>
  </ul>
  
  <p>I could probably do this with a ton of awkward python, but I'd love to know whether this is possible with regex. </p>