[PHP] Re: Reg Ex for replacing or with \n

2002-12-27 Thread Tom Beddard
Yes, i thought it was simple, just wasn't escaping a forward slash $string = preg_replace( "/(|)/i" , "\n",$string); "Tom Beddard" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I'm new to using regular expressions so i'm struggling a bit in making an > expre

Re: [PHP] Re: reg-ex again

2002-04-29 Thread John Fishworld
Sorry don't think I've explained this very clearly ! :-)) Start again People can enter a url with code in, this gets copied to a different server and read as an array ! At this point, the original server path needs to be added to the links in the copied file. The basics of this do actually

Re: [PHP] Re: reg-ex again

2002-04-29 Thread Jason Wong
On Monday 29 April 2002 17:10, John Fishworld wrote: > No the problem is I'm reading a file into an array and then need > to change any of the links in the file from relative links to absolute > links ! > So that my lg_mode.gif gets the full server path in front of it > http://www.ltest.com/lg_mod

Re: [PHP] Re: reg-ex again

2002-04-29 Thread John Fishworld
No the problem is I'm reading a file into an array and then need to change any of the links in the file from relative links to absolute links ! So that my lg_mode.gif gets the full server path in front of it http://www.ltest.com/lg_mode.gif and exactly the same with the other one but of course I

[PHP] Re: reg-ex again

2002-04-29 Thread Henrik Hansen
[EMAIL PROTECTED] (John Fishworld) wrote: > I'm trying to find files in my array > for example > ="lg_imode.gif" > and > ="/db/imodeklein/edgar-IMODE-1-.gif" > > I want to differentiate between the files with slash at the front and ones > without so that > I can add a server path ! > but

[PHP] Re: reg-ex

2002-03-25 Thread liljim
"John Fishworld" <[EMAIL PROTECTED]> wrote in message 002301c1d3fa$b2c2f350$04010a0a@fishworld">news:002301c1d3fa$b2c2f350$04010a0a@fishworld... > How can I change this to accept spaces as well ? > > (ereg("^[A-Za-zÀ-ÖØ-öø-ÿ]*$", $str)) Put a space in the character class. ~James -- PHP Gene