Regexp problem, which pattern to use in split

2004-12-14 Thread Hans Almåsbakk
Hi, I have a problem which I believe is seen before: Finding the correct pattern to use, in order to split a line correctly, using the split function in the re module. I'm new to regexp, and it isn't always easy to comprehend for a newbie :) The lines I want to split are like this: (The followin

Re: Regexp problem, which pattern to use in split

2004-12-14 Thread Fredrik Lundh
Hans Almåsbakk wrote: > Is there a relatively hassle-free way to get the csv module working with > 2.1? The server is running Debian stable/woody, and it also seemed 2.2 can > coexist with 2.1, when I checked the distro packages, if that is any help. 2.3 and 2.4 can also coexist with 2.1 (use "ma

Re: Regexp problem, which pattern to use in split

2004-12-13 Thread Hans Almåsbakk
"Fredrik Lundh" <[EMAIL PROTECTED]> writes: > >>> import csv > > http://online.effbot.org/2003_08_01_archive.htm#librarybook-csv-module > This seems be just the thing I need. Now ofcourse, another problem arouse: The csv module is new in Python 2.3. hans:~# python -V Python 2.1.3 Is there a

Re: Regexp problem, which pattern to use in split

2004-12-13 Thread Matthias Huening
Hans Almåsbakk (14.12.2004 16:02): Any pointer will be greatly appreciated. Maybe I'm attacking this problem the wrong way already from the start? (Not that I can see another way myself :) Hans, did you try the csv module in the Python library? Matthias -- http://mail.python.org/mailman/listinfo/py

Re: Regexp problem, which pattern to use in split

2004-12-13 Thread Fredrik Lundh
Hans Almåsbakk wrote: > These lines are in a csv file exported from excel. > Any pointer will be greatly appreciated. Maybe I'm attacking this problem > the wrong way already from the start? (Not that I can see another way > myself :) >>> import csv http://online.effbot.org/2003_08_01_archive.h