-2

I'm a Python newbie and I need to extract a substring between two characters how can I do?

Example:

Mail field:

mail:"[email protected]"

I need to extract the substring: [email protected]

Many thanks for your help, Marco

Marco.T
  • 1
  • 1

1 Answers1

0

You can use split()

text = 'Mail mail:"[email protected]"'
email = text.split('"')[1]