Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Regular expressions one more time

Posted on 2011-05-12
2
Medium Priority
?
286 Views
Last Modified: 2012-05-11
I just want ask another question. If for example I want to find all e mail addresses for domain me.com how would i write regular expression. Is it possible to use find command with regular expression.
0
Comment
Question by:cer113
2 Comments
 
LVL 41

Expert Comment

by:HonorGod
ID: 35745481
Q: I want to find all e mail addresses for domain me.com how would i write regular expression?
A: Regular Expressions work on text.  So, a regular expression could be written that can be used to process a text file, and locate instances of data that match the regular expression pattern.  So, if you had a text file that included, or contained the e-mail addresses for me.com, then a RegExp pattern could be written to locate these values in the text.

But, if you are trying to get a RegExp to magically determine all of the existing e-mail addresses for me.com, then this can not, and will not work.

RegExp patterns are used to process text.

Q: Is it possible to use find command with regular expression?
A: Yes.  But the RegExp would be used by some utility that is executed by the find command.
    For example, something like this perhaps:

find . -name "*.txt" -print -exec grep "@me.com" {} \;
0
 
LVL 38

Accepted Solution

by:
wesly_chen earned 2000 total points
ID: 35748385
Here is regexp for email address
http://www.regular-expressions.info/email.html

In your case
[A-Z0-9._%+-]+@me.com
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to demonstrate how we can use conditional statements using Python.
Often times it's very very easy to extend a volume on a Linux instance in AWS, but impossible to shrink it. I wanted to contribute to the experts-exchange community a way of providing a procedure that works on an AWS instance. It can also be used on…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses
Course of the Month21 days, 1 hour left to enroll

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question