Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #8263
| From | Dennis Lee Bieber <wlfraed@ix.netcom.com> |
|---|---|
| Subject | Re: Python Regular Expressions |
| Date | 2011-06-22 21:50 -0700 |
| Organization | > Bestiaria Support Staff < |
| References | <3b65fd1f-d377-49b8-b00a-f80462a1213d@35g2000prp.googlegroups.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.312.1308804907.1164.python-list@python.org> (permalink) |
On Wed, 22 Jun 2011 07:00:42 -0700 (PDT), Andy Barnes
<andy.barnes@gmail.com> declaimed the following in
gmane.comp.python.general:
>
> I have a source file in csv format that follows certain rules. I
So why not use the CSV module to read&split the fields...
> It's quite a complicated find and replace operation that can be broken
> down into some easy stages. The main thing the sample above showed was
> that some of the entries won't list any prerequisits - these only need
> the descriptor entry creating. Some of them have more than one
> prerequisite. A line is needed for each prerequisite listed, linking
> it to it's parent.
>
That's output formatting, I won't bother trying to create an
algorithm for that...
> You can also see that the 'name' needs to have spaces removed and it's
> repeated a few times in the process. I Hope it's easy to see what I am
strippedName = "".join(originalName.split())
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Python Regular Expressions Andy Barnes <andy.barnes@gmail.com> - 2011-06-22 07:00 -0700
Re: Python Regular Expressions Andy Barnes <andy.barnes@gmail.com> - 2011-06-22 07:26 -0700
Re: Python Regular Expressions Neil Cerutti <neilc@norwich.edu> - 2011-06-22 14:58 +0000
Re: Python Regular Expressions Peter Otten <__peter__@web.de> - 2011-06-22 17:05 +0200
Re: Python Regular Expressions Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2011-06-22 21:50 -0700
csiph-web