Need help debugging GREP regular expression
up vote
-4
down vote
favorite
Write a single command including a regular expression to find all usernames and domains that eliminates duplicates, includes only the matching search hit text, excluding line numbers, and redirects the output to a text file.
Remember that a username can include letters, numbers and special characters. What I have written will run when [:punct:]
is not present. Please let me know I need to fix. Thanks!
egrep -ro 'b[[:alnum:]][[:punct:]]+@[[:alnum:]][[:punct:]]+.[[:alpha:]]+b'
grep
New contributor
add a comment |
up vote
-4
down vote
favorite
Write a single command including a regular expression to find all usernames and domains that eliminates duplicates, includes only the matching search hit text, excluding line numbers, and redirects the output to a text file.
Remember that a username can include letters, numbers and special characters. What I have written will run when [:punct:]
is not present. Please let me know I need to fix. Thanks!
egrep -ro 'b[[:alnum:]][[:punct:]]+@[[:alnum:]][[:punct:]]+.[[:alpha:]]+b'
grep
New contributor
2
We're not going to do your homework for you. What do you need help with exactly? Please read How to Ask and edit to clarify.
– wjandrea
2 days ago
3
What usernames and domains? You need to give an input sample with your desired output from it for text processing
– Zanna
19 hours ago
add a comment |
up vote
-4
down vote
favorite
up vote
-4
down vote
favorite
Write a single command including a regular expression to find all usernames and domains that eliminates duplicates, includes only the matching search hit text, excluding line numbers, and redirects the output to a text file.
Remember that a username can include letters, numbers and special characters. What I have written will run when [:punct:]
is not present. Please let me know I need to fix. Thanks!
egrep -ro 'b[[:alnum:]][[:punct:]]+@[[:alnum:]][[:punct:]]+.[[:alpha:]]+b'
grep
New contributor
Write a single command including a regular expression to find all usernames and domains that eliminates duplicates, includes only the matching search hit text, excluding line numbers, and redirects the output to a text file.
Remember that a username can include letters, numbers and special characters. What I have written will run when [:punct:]
is not present. Please let me know I need to fix. Thanks!
egrep -ro 'b[[:alnum:]][[:punct:]]+@[[:alnum:]][[:punct:]]+.[[:alpha:]]+b'
grep
grep
New contributor
New contributor
edited 2 days ago
wjandrea
7,70642258
7,70642258
New contributor
asked 2 days ago
Noel
1
1
New contributor
New contributor
2
We're not going to do your homework for you. What do you need help with exactly? Please read How to Ask and edit to clarify.
– wjandrea
2 days ago
3
What usernames and domains? You need to give an input sample with your desired output from it for text processing
– Zanna
19 hours ago
add a comment |
2
We're not going to do your homework for you. What do you need help with exactly? Please read How to Ask and edit to clarify.
– wjandrea
2 days ago
3
What usernames and domains? You need to give an input sample with your desired output from it for text processing
– Zanna
19 hours ago
2
2
We're not going to do your homework for you. What do you need help with exactly? Please read How to Ask and edit to clarify.
– wjandrea
2 days ago
We're not going to do your homework for you. What do you need help with exactly? Please read How to Ask and edit to clarify.
– wjandrea
2 days ago
3
3
What usernames and domains? You need to give an input sample with your desired output from it for text processing
– Zanna
19 hours ago
What usernames and domains? You need to give an input sample with your desired output from it for text processing
– Zanna
19 hours ago
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Noel is a new contributor. Be nice, and check out our Code of Conduct.
Noel is a new contributor. Be nice, and check out our Code of Conduct.
Noel is a new contributor. Be nice, and check out our Code of Conduct.
Noel is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1093356%2fneed-help-debugging-grep-regular-expression%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
We're not going to do your homework for you. What do you need help with exactly? Please read How to Ask and edit to clarify.
– wjandrea
2 days ago
3
What usernames and domains? You need to give an input sample with your desired output from it for text processing
– Zanna
19 hours ago