473,320 Members | 1,902 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

removing extra fields

123 100+
Hi..
I have the below result in my one text file.


|-------------------|-
|email |
|-------------------|--
| |
| |
| |
| |
| abc@yahoo.com |
| email |
| |
| |
| |
| |
| abc@gmail.com |
| ajan@yahoo.com |
| ha@gmail.com |
| abcd@rediff.com |
| web@wemastre.com |
----------------------------------






is the table..that is in one text file..
I just want to have all the email address..

Expand|Select|Wrap|Line Numbers
  1.  
  2.  
  3.       sed -n "/com/p"  result.txt > result.csv
  4.  
and it gives me

| abc @yahoo.com|
| bbb@gmail.com|

something like this..
m missing something to avoid that extra |..
Expand|Select|Wrap|Line Numbers
  1. sed -e 's/|/ /g' result.csv > finalmail.txt
  2.  
is working for both and gives final result.I want to combine both..
Thanks
May 9 '08 #1
1 1179
Ganon11
3,652 Expert 2GB
Maybe a regular expression along the lines of:

Expand|Select|Wrap|Line Numbers
  1. $line_of_text =~ /(\w+\@\w+\.\w+)/;
May 10 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Jonathan Daggar | last post by:
Hello, I'm trying to put together a form with a very tight table formatting. However, every time I put an text-type input field in, the browser pads the area to the right of it with space. I've...
0
by: sameer mowade via .NET 247 | last post by:
Hello All, I have problem while dynamically removing row from the Datagrid which i have added dynamically as shown in the following code snippet. The problem is that while removing dynamically...
3
by: Ray Stevens | last post by:
Does anyone know of a Regex expression from removing extra whitespace within a string (such as 5 spaces instead of 1, etc.)?
2
by: Kun | last post by:
i don't know what happened but all of a sudden, my cgi.fieldstorage has two extra keys, 'x' and 'y', does anyone know how i can remove them in python?
6
by: Niyazi | last post by:
Hi all, What is fastest way removing duplicated value from string array using vb.net? Here is what currently I am doing but the the array contains over 16000 items. And it just do it in 10 or...
17
by: Eric_Dexter | last post by:
def simplecsdtoorc(filename): file = open(filename,"r") alllines = file.read_until("</CsInstruments>") pattern1 = re.compile("</") orcfilename = filename + "orc" for line in alllines: if not...
3
by: majlandt | last post by:
I have the below function witch I use to send mail to reciptents on my maillist from an .asp side I am about to make a bounce back system - and would therefore like to make one extra MailHeader...
2
by: beatTheDevil | last post by:
Hey guys, As the title says I'm trying to make a regular expression (regex/regexp) for use in removing the comments from code. In this case, this particular regex is meant to match /* ... */...
2
code green
by: code green | last post by:
I am trying to write a simple function that will take a string containing an address line or business name and return it nicely formatted. By this I mean extra spaces removed and words capitalised....
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.