I was wondering how I would extract a certain part of a string in Python.
So, let's say I have a list. (EXAMPLE)
1 || awdawd@awdawd.com || awlkdjawldkjalwdkda
2 || aawdawd@awd.com || awdadwawdawdawdawd
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.
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.
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 '||'.
Any help is appreciated.