Skip to content

detecting email addresses? #1386

Answered by rgmz
ethoms-usgs asked this question in Q&A
Apr 2, 2024 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

The $ character means "end of line", so your pattern won't work if there is anything after it. It also won't detect emails that contain upper-case characters (the fix is https://stackoverflow.com/a/34219588).

email = "User@agency.gov";

As an aside, I would recommend adding keywords to make your rule more efficient.

keywords = ["@"]

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@ethoms-usgs
Comment options

@rgmz
Comment options

Answer selected by ethoms-usgs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants