Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #94697
| Path | csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!border1.nntp.ams1.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <python@mrabarnett.plus.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.010 |
| X-Spam-Evidence | '*H*': 0.98; '*S*': 0.00; 'subject: \n ': 0.15; '97m': 0.16; 'collapse': 0.16; 'from:addr:mrabarnett.plus.com': 0.16; 'from:addr:python': 0.16; 'from:name:mrab': 0.16; 'list):': 0.16; 'message-id:@mrabarnett.plus.com': 0.16; 'received:192.168.1.4': 0.16; 'received:84.93': 0.16; 'received:84.93.230': 0.16; 'wrote:': 0.16; 'library': 0.20; '2015': 0.20; 'seems': 0.23; 'header:In-Reply-To:1': 0.24; 'header :User-Agent:1': 0.26; '(it': 0.29; 'closer': 0.29; 'received:84': 0.32; 'getting': 0.33; 'to:addr:python-list': 0.36; 'subject:?': 0.36; 'subject:: ': 0.37; 'does': 0.39; 'received:192': 0.39; 'to:addr:python.org': 0.40; 'skip:u 10': 0.61; 'victor': 0.84 |
| X-CM-Score | 0.00 |
| X-CNFS-Analysis | v=2.1 cv=OoyysHLt c=1 sm=1 tr=0 a=0nF1XD0wxitMEM03M9B4ZQ==:117 a=0nF1XD0wxitMEM03M9B4ZQ==:17 a=0Bzu9jTXAAAA:8 a=EBOSESyhAAAA:8 a=JAI3OqB5mnwA:10 a=IkcTkHD0fZMA:10 a=9UhBjfiFKyHjL8osheQA:9 a=QEXdDO2ut3YA:10 |
| X-AUTH | mrabarnett@:2500 |
| Subject | Re: Split on multiple delimiters, and also treat consecutive delimiters as a single delimiter? |
| To | python-list@python.org |
| References | <fed7bab5-db18-45c3-9ba2-4b7fbfa80602@googlegroups.com> <55b78aa3$0$2206$65785112@news.neostrada.pl> <d0e1a44a-6619-4cb6-937a-ce962cc10094@googlegroups.com> |
| From | MRAB <python@mrabarnett.plus.com> |
| Date | Tue, 28 Jul 2015 15:30:25 +0100 |
| User-Agent | Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 |
| MIME-Version | 1.0 |
| In-Reply-To | <d0e1a44a-6619-4cb6-937a-ce962cc10094@googlegroups.com> |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.20+ |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1049.1438093834.3674.python-list@python.org> (permalink) |
| Lines | 22 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1438093834 news.xs4all.nl 2894 [2001:888:2000:d::a6]:51241 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:94697 |
Show key headers only | View raw
On 2015-07-28 15:09, Victor Hooi wrote:
> On Tuesday, 28 July 2015 23:59:11 UTC+10, m wrote:
>> W dniu 28.07.2015 o 15:55, Victor Hooi pisze:
>> > I know the regex library also has a split, unfortunately, that does not collapse consecutive whitespace:
>> >
>> > In [19]: re.split(' |', f)
>>
>> Try ' *\|'
>>
>> p. m.
>
> Hmm, that seems to be getting closer (it returns a four-element list):
>
> In [23]: re.split(' *\|', f)
> Out[23]:
> [' 14 *0 330 *0 760 411',
> '0 0 770g 1544g 117g 1414 computedshopcartdb:103.5% 0 30',
> '0 0',
> '1 19m 97m 1538 ComputedCartRS PRI 09:40:26']
>
Try '[ |]+'.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Split on multiple delimiters, and also treat consecutive delimiters as a single delimiter? Victor Hooi <victorhooi@gmail.com> - 2015-07-28 06:55 -0700
Re: Split on multiple delimiters, and also treat consecutive delimiters as a single delimiter? m <mvoicem@gmail.com> - 2015-07-28 15:59 +0200
Re: Split on multiple delimiters, and also treat consecutive delimiters as a single delimiter? Victor Hooi <victorhooi@gmail.com> - 2015-07-28 07:09 -0700
Re: Split on multiple delimiters, and also treat consecutive delimiters as a single delimiter? MRAB <python@mrabarnett.plus.com> - 2015-07-28 15:30 +0100
Re: Split on multiple delimiters, and also treat consecutive delimiters as a single delimiter? Chris Angelico <rosuav@gmail.com> - 2015-07-29 10:08 +1000
Re: Split on multiple delimiters, and also treat consecutive delimiters as a single delimiter? Rustom Mody <rustompmody@gmail.com> - 2015-07-28 19:41 -0700
Re: Split on multiple delimiters, and also treat consecutive delimiters as a single delimiter? Joel Goldstick <joel.goldstick@gmail.com> - 2015-07-28 21:28 -0400
csiph-web