Re: Using grep for organizing emails
OK, my original idea should work pretty well for the second format that you want, just change the replace with to \2. For the comma- separated addresses on a single line use, ([^<]+)<([^>]+)>\r for the regex, then \2, for the replace with. You'll of course need to delete the last command from the result. That at least worked for me. -Kendall On Jan 17, 12:25 am, "maciek.schejbal" wrote: > Kendall, I would like these lines: > > Joel lkj > "lkj...@gmail.com" > > "Mr.Gilbert Llkjlkj" > > to appear like this: > > joe...@gmail.com, lkj...@gmail.com, l...@aol.com, lkj...@fasny.org > > and afterwards like this: > > joe...@gmail.com > lkj...@gmail.com > l...@aol.com > lkj...@fasny.org > > Many thanks, > Maciek > > On Jan 15, 8:30 pm, Kendall Conrad wrote: > > > It would be helpful to see an example of what you're working with. > > I'll assume it looks something like this, > > > john > > jan > > > Grep: ^([^<]+)<([^>]+)>$ > > Replace with: \1,\2 > > > That gets pretty close depending on the exact format you have to work > > from, and I'm also not sure what you want to end result to look like. > > If you could provide examples I could give a more precise solution. > > > ~angelwatt > > > On Jan 15, 1:36 pm, "maciek.schejbal" > > wrote: > > > > Hi, > > > > I have a list of emails enclosed within <> signs preceded by a name, > > > usually in two or three word format. I need to extract those emails > > > and place them in a comma-delimited document. > > > > Each entry is on a separate line, followed by the carriage return > > > though I'm curious how to perform that extraction without separate > > > lines present. > > > > Thanks for your help, > > > Maciek -- You received this message because you are subscribed to the "BBEdit Talk" discussion group on Google Groups. To post to this group, send email to bbedit@googlegroups.com To unsubscribe from this group, send email to bbedit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/bbedit?hl=en If you have a feature request or would like to report a problem, please email "supp...@barebones.com" rather than posting to the group.
Re: Using grep for organizing emails
Not sure my reply went through so I'm resending with better examples. Kendall, I would like these lines: Joel lkj "lkj...@gmail.com" "Mr.Gilbert Llkjlkj" to appear like this: joe...@gmail.com, lkj...@gmail.com, l...@aol.com, lkj...@fasny.org and afterwards like this: joe...@gmail.com lkj...@gmail.com l...@aol.com lkj...@fasny.org Many thanks, Maciek On Jan 15, 8:30 pm, Kendall Conrad wrote: > It would be helpful to see an example of what you're working with. > I'll assume it looks something like this, > > john > jan > > Grep: ^([^<]+)<([^>]+)>$ > Replace with: \1,\2 > > That gets pretty close depending on the exact format you have to work > from, and I'm also not sure what you want to end result to look like. > If you could provide examples I could give a more precise solution. > > ~angelwatt > > On Jan 15, 1:36 pm, "maciek.schejbal" > wrote: > > > Hi, > > > I have a list of emails enclosed within <> signs preceded by a name, > > usually in two or three word format. I need to extract those emails > > and place them in a comma-delimited document. > > > Each entry is on a separate line, followed by the carriage return > > though I'm curious how to perform that extraction without separate > > lines present. > > > Thanks for your help, > > Maciek -- You received this message because you are subscribed to the "BBEdit Talk" discussion group on Google Groups. To post to this group, send email to bbedit@googlegroups.com To unsubscribe from this group, send email to bbedit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/bbedit?hl=en If you have a feature request or would like to report a problem, please email "supp...@barebones.com" rather than posting to the group.
Re: Using grep for organizing emails
Hi Kendall, here is the concrete example. I want to turn: ann lkjlkjlkj Nlkjlkj Teilkjea "whoe...@me.com" "Mr. Cashman" into: tlkjl...@msn.com, nlkj...@gmail.com, whoe...@me.com, c...@mac.com and into: tlkjl...@msn.com nlkj...@gmail.com whoe...@me.com c...@mac.com Many thanks, Maciek On Jan 15, 8:30 pm, Kendall Conrad wrote: > It would be helpful to see an example of what you're working with. > I'll assume it looks something like this, > > john > jan > > Grep: ^([^<]+)<([^>]+)>$ > Replace with: \1,\2 > > That gets pretty close depending on the exact format you have to work > from, and I'm also not sure what you want to end result to look like. > If you could provide examples I could give a more precise solution. > > ~angelwatt > > On Jan 15, 1:36 pm, "maciek.schejbal" > wrote: > > > Hi, > > > I have a list of emails enclosed within <> signs preceded by a name, > > usually in two or three word format. I need to extract those emails > > and place them in a comma-delimited document. > > > Each entry is on a separate line, followed by the carriage return > > though I'm curious how to perform that extraction without separate > > lines present. > > > Thanks for your help, > > Maciek -- You received this message because you are subscribed to the "BBEdit Talk" discussion group on Google Groups. To post to this group, send email to bbedit@googlegroups.com To unsubscribe from this group, send email to bbedit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/bbedit?hl=en If you have a feature request or would like to report a problem, please email "supp...@barebones.com" rather than posting to the group.
Re: Using grep for organizing emails
It would be helpful to see an example of what you're working with. I'll assume it looks something like this, john jan Grep: ^([^<]+)<([^>]+)>$ Replace with: \1,\2 That gets pretty close depending on the exact format you have to work from, and I'm also not sure what you want to end result to look like. If you could provide examples I could give a more precise solution. ~angelwatt On Jan 15, 1:36 pm, "maciek.schejbal" wrote: > Hi, > > I have a list of emails enclosed within <> signs preceded by a name, > usually in two or three word format. I need to extract those emails > and place them in a comma-delimited document. > > Each entry is on a separate line, followed by the carriage return > though I'm curious how to perform that extraction without separate > lines present. > > Thanks for your help, > Maciek -- You received this message because you are subscribed to the "BBEdit Talk" discussion group on Google Groups. To post to this group, send email to bbedit@googlegroups.com To unsubscribe from this group, send email to bbedit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/bbedit?hl=en If you have a feature request or would like to report a problem, please email "supp...@barebones.com" rather than posting to the group.
Using grep for organizing emails
Hi, I have a list of emails enclosed within <> signs preceded by a name, usually in two or three word format. I need to extract those emails and place them in a comma-delimited document. Each entry is on a separate line, followed by the carriage return though I'm curious how to perform that extraction without separate lines present. Thanks for your help, Maciek -- You received this message because you are subscribed to the "BBEdit Talk" discussion group on Google Groups. To post to this group, send email to bbedit@googlegroups.com To unsubscribe from this group, send email to bbedit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/bbedit?hl=en If you have a feature request or would like to report a problem, please email "supp...@barebones.com" rather than posting to the group.