Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UKThK-0004yY-Il for pgsql-sql@arkaria.postgresql.org; Tue, 26 Mar 2013 13:13:54 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UKThJ-0001Xi-Ut for pgsql-sql@arkaria.postgresql.org; Tue, 26 Mar 2013 13:13:54 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UKThI-0001Xc-UV for pgsql-sql@postgresql.org; Tue, 26 Mar 2013 13:13:53 +0000 Received: from mail-pb0-f45.google.com ([209.85.160.45]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UKThF-00059q-QE for pgsql-sql@postgresql.org; Tue, 26 Mar 2013 13:13:51 +0000 Received: by mail-pb0-f45.google.com with SMTP id ro8so4739402pbb.18 for ; Tue, 26 Mar 2013 06:13:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:user-agent:date:subject:from:to:message-id:thread-topic :in-reply-to:mime-version:content-type:x-gm-message-state; bh=VMjYl2B1mT4U71m6C3Q44l8QDo9ktK3Bbl78NmzJN8M=; b=bUo/BdUztJclzbeBCs7qUL6zYZ3A0Z84/J2RuZn1bjbZEkz9RjudNz1/aWyhP3gJxt H3t2wNpP2d9vh5zyVG1AZcYRNreb37dD6NLttOQy7L4PXxymqP3TSCRKu8lxKnotB0WW +V1hmsuPQM5WrZvr9zd5cON0n+iPMIsPSoap+GlHzBBM/t2aogQtpB8mWNqF1LtFSM75 2Uw8YrH1G46pDsD/p4x1jT5QAqzxN4I13j8hp0bSZO4dG5Y5ANtw+xeuTBnh2oUnwaej VIOaGj/Iq+ZUgCSMnkI0Fww8WPrkIeTMbO16lwB0v1uVDfS8kdxwik6uzIHK4vjDxB4I bIxw== X-Received: by 10.68.211.69 with SMTP id na5mr23240730pbc.71.1364303626239; Tue, 26 Mar 2013 06:13:46 -0700 (PDT) Received: from [10.0.1.10] (adsl-074-245-040-156.sip.clt.bellsouth.net. [74.245.40.156]) by mx.google.com with ESMTPS id gf1sm17500453pbc.24.2013.03.26.06.13.43 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 26 Mar 2013 06:13:45 -0700 (PDT) User-Agent: Microsoft-MacOutlook/14.3.2.130206 Date: Tue, 26 Mar 2013 09:13:39 -0400 Subject: Re: how can I replace all instances of a pattern From: James Sharrett To: Message-ID: Thread-Topic: how can I replace all instances of a pattern In-Reply-To: Mime-version: 1.0 Content-type: multipart/alternative; boundary="B_3447134023_23431941" X-Gm-Message-State: ALoCoQmhQaetuFqY4wnN60NeHz8dLj7rSBpDnD8s0uQLVNfEiaNUbhYja8TJi6/56MOhmC5Hv7aI X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org > This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --B_3447134023_23431941 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit Sorry, caught a typo. Mytext1 is correctly replaced because only one instance of the character (space) is in the string. This deals with the correct characters but only does the first instance of the character so the output is: 'Mytext1' 'Mytext 2' (wrong) 'Mytext-3' (wrong) 'My_text4' 'My!text5' --B_3447134023_23431941 Content-type: text/html; charset="US-ASCII" Content-transfer-encoding: quoted-printable
Sorry, caught a ty= po.  Mytext1 is correctly replaced because only one instance of the cha= racter (space) is in the string.

This deals with the correct = characters but only does the first instance of the character so the output i= s:

    'Mytext1'
  &n= bsp; 'Mytext 2'  (wrong)
    'Mytext-3'  (wron= g)
    'My_text4'
    'My!text5'

--B_3447134023_23431941--