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: 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" To: "Massi" , X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: 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 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=3Dsunedison.com@python.org [mailto:python-list-bounces+atadesse=3Dsunedison.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! --=20 http://mail.python.org/mailman/listinfo/python-list