Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!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.030 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'subject:Python': 0.05; 'python': 0.09; '"\\n")': 0.09; 'python:': 0.09; 'skip:\\ 30': 0.09; 'subject:values': 0.16; '8bit%:3': 0.17; 'basically': 0.17; 'replacing': 0.17; 'equivalent': 0.20; 'all,': 0.21; 'tried': 0.25; 'skip:[ 10': 0.26; 'values': 0.26; 'appreciated': 0.27; 'replace': 0.27; 'message-id:@mail.gmail.com': 0.27; 'skip:& 10': 0.29; 'e.g.': 0.30; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'skip:l 30': 0.35; 'but': 0.36; 'subject:" ': 0.36; 'subject:with': 0.36; 'some': 0.38; 'to:addr:python.org': 0.39; 'help': 0.40; 'your': 0.60; 'assistance': 0.63; 'dear': 0.66; 'as:': 0.75; '[name]': 0.84; 'leo': 0.84; '\xa0your': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type; bh=cWtozi7CPpK0tpyZ0+AED2SnsjyqxHftjJW+vQnVBaI=; b=qGNFC3bQGeS+oGDSd32toDnspSkt4mCHw2Mp+I0l1fk7a+aJVEJcihERdZ2EUyW8vs EdUU9IwmIw/9xL4iooPqdKy3LejhdKKXleOie/rRjACtuqCTtTcW3VdbKDF8L2ARPmTs vHOT4PoOi1cT95CXVvrSRjw3/sg/CIzuJn6dVmaSU4nb22UYz/KDbuJ2YbNXEGMiELKo 0PzDfsdwtLHUzGt51AZ2aLWnWYeGgs1LiES/06senz1xukUSLo4sZAJf0yX2sgxUw3iP K2LQJSL7FeLVyZnw5TDWeHpiA0P3fliwtezBlKtsu24zQGofH0cilzJeLgZFhoe3hv6e bvLQ== MIME-Version: 1.0 X-Received: by 10.224.178.148 with SMTP id bm20mr2669026qab.30.1363707411926; Tue, 19 Mar 2013 08:36:51 -0700 (PDT) Date: Tue, 19 Mar 2013 11:36:51 -0400 Subject: Replace "dash" values in a field with new line- VB equivalent of Python From: Cathy James To: python-list@python.org Content-Type: multipart/alternative; boundary=20cf303b3885dd9ae304d848df6e X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 43 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1363707421 news.xs4all.nl 6919 [2001:888:2000:d::a6]:39222 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:41524 --20cf303b3885dd9ae304d848df6e Content-Type: text/plain; charset=ISO-8859-1 Dear All, I need some assistance with Python so that values in the "Name" field e.g. Murray - James - Leo can be labeled as: Murray James Leo with a new line replacing every dash. Basically I need the equivalent of this VB in Python: replace ( [Name] , "-", vbNewLine) I tried this but no luck: str.[Name].replace("-", "\n") str.[Name].replace("-", \n) [Name].replace("-", \n") Your help is appreciated --20cf303b3885dd9ae304d848df6e Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Dear All,
I need some assistance with Python so that values= in the "Name" field e.g. Murray - James - Leo can be labeled as:=
=A0
Murray
James
Leo
= =A0
with a new line replacing=A0every dash.
=A0
Basica= lly I need the equivalent of this=A0VB in Python:
replace ( [Name] =A0, "-", vbNe= wLine)
=A0
I tried this but no luck:
=A0
str.[N= ame].replace("-", "\n")
str.[Name].replace(&q= uot;-", \n)
[Name].replace("-", \n")
=A0
Your help is appreciated
--20cf303b3885dd9ae304d848df6e--