Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #16115

RE: String splitting by spaces question

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <atadesse@sunedison.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.096
X-Spam-Evidence '*H*': 0.81; '*S*': 0.00; 'comprises': 0.07; 'advance!': 0.09; 'message-----': 0.12; 'wednesday,': 0.15; 'subject:String': 0.16; 'subject:question': 0.17; 'this?': 0.19; 'to:2**1': 0.21; 'header:In-Reply-To:1': 0.22; 'string': 0.24; 'function': 0.27; 'url:mailman': 0.28; 'pass': 0.29; 'received:messagelabs.com': 0.29; 'problem': 0.29; 'array': 0.30; 'splitting': 0.30; 'thanks': 0.31; 'everyone,': 0.32; 'url:listinfo': 0.32; 'to:addr:python-list': 0.34; 'subject:': 0.34; 'parse': 0.34; 'url:python': 0.36; 'sent:': 0.36; 'question': 0.36; 'charset:us-ascii': 0.37; 'skip:p 50': 0.37; 'from:': 0.39; 'url:org': 0.39; 'to:addr:python.org': 0.40; '2011': 0.61; 'achieve': 0.61; 'spaces': 0.73; 'subject: ': 0.74; 'quotations': 0.84; 'spaces.': 0.84; 'substrings': 0.84; 'to:addr:msn.com': 0.96
X-Env-Sender atadesse@sunedison.com
X-Msg-Ref server-10.tower-86.messagelabs.com!1322069518!3173093!4
X-Originating-IP [167.170.98.125]
X-StarScan-Version 6.3.6; banners=-,-,-
X-VirusChecked Checked
X-MimeOLE Produced By Microsoft Exchange V6.5
Content-class urn:content-classes:message
MIME-Version 1.0
Content-Type text/plain; charset="us-ascii"
Content-Transfer-Encoding quoted-printable
Subject RE: String splitting by spaces question
Date Wed, 23 Nov 2011 11:31:21 -0600
In-Reply-To <3f19e4c0-e010-4cb2-9f71-dd09e0d3cb1f@r9g2000vbw.googlegroups.com>
X-MS-Has-Attach
X-MS-TNEF-Correlator
Thread-Topic String splitting by spaces question
Thread-Index AcyqA4Kz31b2cWm8QNeWMqE8rKTCEgAAgx7A
References <3f19e4c0-e010-4cb2-9f71-dd09e0d3cb1f@r9g2000vbw.googlegroups.com>
From "Alemu Tadesse" <atadesse@sunedison.com>
To "Massi" <massi_srb@msn.com>, <python-list@python.org>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.2975.1322069528.27778.python-list@python.org> (permalink)
Lines 34
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1322069528 news.xs4all.nl 6924 [2001:888:2000:d::a6]:52126
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:16115

Show key headers only | View raw


Hi Everyone,

Can we use rsplit function on an array or vector of strings ? it works
for one not for vector

Alemu


-----Original Message-----
From: python-list-bounces+atadesse=sunedison.com@python.org
[mailto:python-list-bounces+atadesse=sunedison.com@python.org] On Behalf
Of Massi
Sent: Wednesday, November 23, 2011 10:10 AM
To: python-list@python.org
Subject: String splitting by spaces question

Hi everyone,

I have to parse a string and splitting it by spaces. The problem is
that the string can include substrings comprises by quotations which
must mantain the spaces. What I need is to pass from a string like:

This is an 'example string'

to the following vector:

["This", "is", "an", "example string"]

Which is the best way to achieve this?
Thanks in advance!
-- 
http://mail.python.org/mailman/listinfo/python-list

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

String splitting  by spaces question Massi <massi_srb@msn.com> - 2011-11-23 09:10 -0800
  RE: String splitting  by spaces question "Alemu Tadesse" <atadesse@sunedison.com> - 2011-11-23 11:31 -0600
  Re: String splitting by spaces question Arnaud Delobelle <arnodel@gmail.com> - 2011-11-23 17:40 +0000
  Re: String splitting by spaces question Nick Dokos <nicholas.dokos@hp.com> - 2011-11-23 12:51 -0500
  Re: String splitting  by spaces question Miki Tebeka <miki.tebeka@gmail.com> - 2011-11-23 12:40 -0800
  Re: String splitting  by spaces question Phil Rist <Phil_member@newsguy.com> - 2011-11-23 16:20 -0800
    Re: String splitting by spaces question DevPlayer <devplayer@gmail.com> - 2011-11-23 19:53 -0800

csiph-web