human
python regex get first part of an email address
assistant
Here is some code to split string `s` by '@' and get the first element

s.split('@')[0]

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.