Regular expression syntax error

Joined
Dec 20, 2015
Messages
2
Reaction score
0
Hi, I'm fairly new to python and am having an issue with with syntax. My code is:

Code:
# CREATE EMAIL REGEX
email.Regex = re.compile(r'''(
[a-zA-Z0-9._%+-]+.       #username
@                                   #@ symbol
[a-zA-Z0-9._%+-]+.       #domain name
(\.[a-zA-Z]{2,4}.            # dot something
)''', re.VERBOSE)

I'm receiving the error:
Code:
line 28
emailRegex = re.compile(r'''(
                   ^
SyntaxError: invalid syntax
I'm not quite sure what it is I've done wrong.
Python version is 2.7.9
 
Last edited:

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top