inserting data that contains / or \

From: "Patrick Hatcher" <PHatcher(at)macys(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: inserting data that contains / or \
Date: 2002-10-03 17:02:37
Message-ID: OFDFEC13EB.5F749798-ON88256C47.005CC441-88256C47.005DA5EA@fds.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Sorry up front. I know this has probably been answered 10k times.
I need to insert data into a field that will look as such: MC HANCOCK GOLD
5PPS S/4

my perl is getting better, but not quite there yet: I have the following
regex:
$fields[$i] =~ s/\// /g; which now puts a space in place of the /, but I
would like to the keep the text as is. I believe I need to replace the
single foward slash with 2 forward slashes. But I'm lost as to how to do
it
Should it be this: $fields[$i] =~ s/\//\///g;?

TIA

Patrick Hatcher
Macys.Com

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2002-10-03 17:12:42 Re: Help creating a function
Previous Message Eduardo Cadena 2002-10-03 16:11:10 Help creating a function