Re: [PHP] Re: newline and pregreplace

2005-06-24 Thread Dotan Cohen
On 6/25/05, Bob Winter <[EMAIL PROTECTED]> wrote: > > > Bob Winter wrote: > > Dotan Cohen wrote: > > > >> I've got a line like this: > >> $str=preg_replace( "-regex here-", '\n\1', $str); > >> > >> Which has one of two problems: If I leave the single quotes around the > >> second argument, then i

[PHP] Re: newline and pregreplace

2005-06-24 Thread Bob Winter
Bob Winter wrote: Dotan Cohen wrote: I've got a line like this: $str=preg_replace( "-regex here-", '\n\1', $str); Which has one of two problems: If I leave the single quotes around the second argument, then it returns as \n and not a newline. If I change the single quotes to double quotes, t

[PHP] Re: newline and pregreplace

2005-06-24 Thread Bob Winter
Dotan Cohen wrote: I've got a line like this: $str=preg_replace( "-regex here-", '\n\1', $str); Which has one of two problems: If I leave the single quotes around the second argument, then it returns as \n and not a newline. If I change the single quotes to double quotes, then the info from the