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


Groups > comp.lang.python > #41524

Replace "dash" values in a field with new line- VB equivalent of Python

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 <nambo4jb@gmail.com>
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 <nambo4jb@gmail.com>
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 <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.3521.1363707421.2939.python-list@python.org> (permalink)
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

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

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

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


Thread

Replace "dash" values in a field with new line- VB equivalent of Python Cathy James <nambo4jb@gmail.com> - 2013-03-19 11:36 -0400
  Re: Replace "dash" values in a field with new line- VB equivalent of Python Neil Cerutti <neilc@norwich.edu> - 2013-03-19 15:52 +0000
  Re: Replace "dash" values in a field with new line- VB equivalent of Python rusi <rustompmody@gmail.com> - 2013-03-19 08:59 -0700

csiph-web