Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!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.028 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'names.': 0.07; 'output': 0.11; 'subject:file': 0.13; 'wrote:': 0.15; 'clear.': 0.16; 'guys,': 0.16; 'received:209.85.213.174': 0.16; 'received:mail- yx0-f174.google.com': 0.16; 'subject:random': 0.16; 'cc:addr :python-list': 0.16; 'pm,': 0.16; 'singh': 0.19; 'cheers,': 0.19; 'language': 0.20; 'input': 0.21; 'cc:2**0': 0.21; 'cc:no real name:2**0': 0.22; 'header:In-Reply-To:1': 0.22; 'trying': 0.23; 'tue,': 0.23; 'random': 0.28; 'message-id:@mail.gmail.com': 0.28; 'problem': 0.29; 'cc:addr:python.org': 0.30; 'fairly': 0.30; 'chris': 0.32; 'file.': 0.32; 'quite': 0.34; "isn't": 0.35; 'subject:text': 0.35; 'file': 0.36; 'useful': 0.37; 'received:google.com': 0.38; 'received:209.85': 0.38; 'subject:: ': 0.38; 'something': 0.38; 'help': 0.39; 'subject:with': 0.39; 'meaning': 0.40; 'received:209': 0.40; 'where': 0.40; 'your': 0.60; 'you.': 0.62; 'subject:Change': 0.67; 'subject:name': 0.67; 'exact': 0.69; '12:17': 0.84; 'sender:addr:chris': 0.84; 'format)': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rebertia.com; s=google; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=5XYopdbmhkadaKPGPepBuWMu3oWJQBko0bR9GcCim2o=; b=PA827SJqE9mta7OdTJkYzmsZBjQGSqTjhYi5sZXXmtXnEi+8Lm/cU4WgAeG2ih7zK5 5HpKZ8ib4JHUXb12iE0WTHmDpktqipgEmfhPvzC73Ichlfv6hnjqKk/EBxKbKQXjoTei 1EHa50pKEGrc5Yy8YMwgg1GWcUKB/rQfki9jM= MIME-Version: 1.0 Sender: chris@rebertia.com In-Reply-To: <190e6c5d-00d2-4043-82f2-a33bf9be5fac@h25g2000prf.googlegroups.com> References: <190e6c5d-00d2-4043-82f2-a33bf9be5fac@h25g2000prf.googlegroups.com> Date: Tue, 28 Jun 2011 23:16:48 -0700 X-Google-Sender-Auth: 1xbDFonZ6bl_8Ix-OIgDIoFZzrE Subject: Re: Change the name with the random names in a text file From: Chris Rebert To: Amaninder Singh Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 21 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1309328210 news6.xs4all.nl 4357 [2001:888:2000:d::a6]:46364 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:8557 On Tue, Jun 28, 2011 at 12:17 PM, Amaninder Singh wr= ote: > Hi Guys, > I am fairly new to the language and programing. I am trying to solve a > problem in a text file. Where names are something like in this =C2=A0mann= er > [**Name2 (NI) 98**] > > [**Last Name (STitle) 97**] > =C2=A0[**First Name4 (NamePattern1) 93**] > [**Last Name (NamePattern1) 94**] > ([**Name (NI) 95**]) > =C2=A0[**Last Name (un) 96**] > I am trying to change these with random names. The problem (particularly the exact meaning of your input file format) isn't quite clear. Sample output would be useful to those trying to help you. Cheers, Chris