title: How do I extract a certain part of a string in Python?
body: <p>I was wondering how I would extract a certain part of a string in Python.</p>
  
  <p>So, let's say I have a list. (EXAMPLE)</p>
  
  <pre><code>1 || awdawd@awdawd.com || awlkdjawldkjalwdkda
  2 || aawdawd@awd.com || awdadwawdawdawdawd
  </code></pre>
  
  <p>I know I could use indexing and take the last 10 or so characters from each line, but that wouldn't work if they're different lengths. And it wouldn't work at all for the email.</p>
  
  <p>I'm thinking regular expressions, but once I find the portion of the string, how would I copy just that part of the string and append it to, say, a list.</p>
  
  <p>The regular expression is simple for the email, but not so simple for the string after the '||'. So how would I do that? I'm having trouble getting my head around it. Maybe search for || and get everything after it? But then there's two '||'.</p>
  
  <p>Any help is appreciated.</p>