View Single Post

   
  #2 (permalink)  
Old 04-09-2008, 09:27 AM
Tom Lane
 
Posts: n/a
Default Re: Backslashes in data in version 8.1.2

Mike Nolan <nolan@gw.tssi.com> writes:
> When I moved up to 8.1.2 one of my PHP programs appears to be broken,
> I am getting backslashes in my data that I don't want.
> Investigating further, I have found some inconsistencies in how verion
> 8.1.2 handles data with backslashes in it:


This has not changed from prior versions. It looks like you are
neglecting to allow for the fact that backslash is an escape character
both at the string-literal level and at the regex-pattern level.
Therefore you must write twice as many backslashes as you normally
would write in a regex pattern. In particular, '\\\\' to match a
literal backslash.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Reply With Quote