Re:Show HN: I wrote a book on Python regular expressions
by _eht on Thursday August 08, 2019 @03:16PM
(#20647621)
You should allow “$” on the left; as per the RFC...
Re:Show HN: I wrote a book on Python regular expressions
by just_myles on Thursday August 08, 2019 @03:52PM
(#20647994)
Why I hate regex :) . You think you know it but, you never really do.
Re:Show HN: I wrote a book on Python regular expressions
by nerdponx on Thursday August 08, 2019 @10:25PM
(#20650851)
That's about the email RFC, not about regex syntax.
Re:Show HN: I wrote a book on Python regular expressions
by just_myles on Friday August 09, 2019 @12:16PM
(#20655704)
Ok cool.
email_reg = re.compile (r'''
([a-zA-Z0-9._%+-]+ #First name and last name
@ #@ sign
[a-zA-Z0-9._%+-]+ #domain name
\.[a-zA-Z]{2,10}) #.com
''',re.VERBOSE)