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'









share|improve this question









New contributor




Noel is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 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















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'









share|improve this question









New contributor




Noel is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 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













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'









share|improve this question









New contributor




Noel is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











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






share|improve this question









New contributor




Noel is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Noel is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 2 days ago









wjandrea

7,70642258




7,70642258






New contributor




Noel is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 2 days ago









Noel

1




1




New contributor




Noel is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Noel is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Noel is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








  • 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




    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















active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});






Noel is a new contributor. Be nice, and check out our Code of Conduct.










 

draft saved


draft discarded


















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






























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.










 

draft saved


draft discarded


















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.















 


draft saved


draft discarded














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





















































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







Popular posts from this blog

數位音樂下載

When can things happen in Etherscan, such as the picture below?

格利澤436b