title: How to convert a multiline string into a list of lines?
body: <p>In sikuli I've get a multiline string from clipboard like this...</p>
  
  <pre><code>Names = App.getClipboard();
  </code></pre>
  
  <p>So Name =</p>
  
  <pre><code>#corazona
  #Pebleo00
  #cofriasd
  «paflio
  </code></pre>
  
  <p>and I have use this regex to delete the first character if it is not in x00-x7f hex range or is not a word, or is a digit</p>
  
  <pre><code>import re
  Names = re.sub(r"(?m)^([^\x00-\x7F]+|\W|\d)", "", Names)
  </code></pre>
  
  <p>So now Names =</p>
  
  <pre><code>corazona
  Pebleo00
  cofriasd
  paflio
  </code></pre>
  
  <p>But, I am having trouble with the second regex that converts "Names" into the items of a sequence. I would like to convert "Names" into...</p>
  
  <pre><code>'corazona', 'Pebleo00', 'cofriasd', 'paflio'
  </code></pre>
  
  <p>or</p>
  
  <pre><code>'corazona', 'Pebleo00', 'cofriasd', 'paflio', 
  </code></pre>
  
  <p>So sikuli can then recognize it as a List (I've found that Sikuli is able to recognize it even with those last "comma" and "space" in the end) by using...</p>
  
  <pre><code>NamesAsList = eval(Names)
  </code></pre>
  
  <p>How could I do this in python? is it necessary to use regex, or there is other way to do this in python?</p>
  
  <p>I have already done this but using .Net regex, I just don't know how to do it in python, I have googled it with no result.
  This is how I did it using .Net regex</p>
  
  <pre><code>Text to find:
  (.*[^$])(\r\n|\z)
  Replace with:
  '$1',%" "%
  </code></pre>
  
  <p>Thanks Advanced.</p>