cyucelen / marker

🖍️ Marker is the easiest way to match and mark strings for colorful terminal outputs!
MIT License
47 stars 13 forks source link

Match e-mail address #10

Closed cyucelen closed 4 years ago

cyucelen commented 4 years ago

Create a matcher that matches e-mail addresses such as:

foo@bar.com
john@doe.io
etc..
richardbertozzo commented 4 years ago

Hi @cyucelen

Can i get this one?

johnny-silverhand commented 4 years ago

Hi @cyucelen @richardbertozzo I created a PR #15 to solve this issue. I want to get some feedback, like code review. Thank you!

cyucelen commented 4 years ago

Hi @johnny-silverhand @richardbertozzo I just wrote a review. We can discuss which RFC standard to match and which regular expression we are going to use for this feature. You guys may look over some email RFC standards.

richardbertozzo commented 4 years ago

Yes, @johnny-silverhand maybe can use this for the regex: https://gist.github.com/gregseth/5582254. Has simpler version.

johnny-silverhand commented 4 years ago

@richardbertozzo Looks good to me! Because the official standard is considered RFC 2822. At the same time the email format is formally defined in RFC 5322. So, Which of the RFCs will we choose?

richardbertozzo commented 4 years ago

I think the Simpler version in the link its great and will reach 99% of emails.

cyucelen commented 4 years ago

Lets go with the RFC5322, since it obsoletes RFC2822.

cyucelen commented 4 years ago

@johnny-silverhand @richardbertozzo how is it going guys? Need any help?

richardbertozzo commented 4 years ago

I can send a version, but will override the PR of @johnny-silverhand.

cyucelen commented 4 years ago

Since implementation is small, make it.