Re: [PHP] regular expressions help please

2002-04-30 Thread Miguel Cruz
I wasn't paying that much attention. The /i is a preg thing. It's the same as changing from ereg to eregi. miguel On Wed, 1 May 2002, John Fishworld wrote: > aha ! > thats very strange then because mine works at the moment but if I add the /i > at the end then it doesn't ! > > > On Wed, 1 May

Re: [PHP] regular expressions help please

2002-04-30 Thread John Fishworld
aha ! thats very strange then because mine works at the moment but if I add the /i at the end then it doesn't ! > On Wed, 1 May 2002, John Fishworld wrote: > > Thanks after playing about with that I've got the following which does seem > > to work ! > > > > $imode_code[$i] = eregi_replace("(src=)

Re: [PHP] regular expressions help please

2002-04-30 Thread Miguel Cruz
On Wed, 1 May 2002, John Fishworld wrote: > Thanks after playing about with that I've got the following which does seem > to work ! > > $imode_code[$i] = eregi_replace("(src=)(\")([a-z0-9_\/-]+\.gif)(\")", > "\\1\\2$path/\\3\\2", $imode_code[$i]); > > Very very very slowly getting the hang of re

Re: [PHP] regular expressions help please

2002-04-30 Thread John Fishworld
Thanks after playing about with that I've got the following which does seem to work ! $imode_code[$i] = eregi_replace("(src=)(\")([a-z0-9_\/-]+\.gif)(\")", "\\1\\2$path/\\3\\2", $imode_code[$i]); Very very very slowly getting the hang of regexs ! What does your /i do at the end ??? Thanks > T

Re: [PHP] regular expressions help please

2002-04-30 Thread Jason Wong
On Tuesday 30 April 2002 21:09, John Fishworld wrote: > Duh ! lol sorry ! >   href="imode.fpl?op=imodecard&prefix=IMODE&nummer=1&suffx=&uid=55%2eFAGAE&pa > > > > Unfortunately, no. Could you post say 20 lines of this file you're > > > > talking about. > > > > I mean the file that you're readin

Re: [PHP] regular expressions help please

2002-04-30 Thread Miguel Cruz
On Tue, 30 Apr 2002, Ed Lazor wrote: > Pull everything except a specific word from a sentence. For example, > pulling everything except the word run from "the water run was steep". $str = 'the water run was steep'; print preg_replace('/(\s*water)/', '', $str); > Pull all words from a str

Re: [PHP] regular expressions help please

2002-04-30 Thread John Fishworld
Duh ! lol sorry ! Example 1 Locations Welcome to Your Preference: 驪 Schwul Lesbisch Example 2 i-mode   Auswahl   Mehr Karten   Karten suchen   Impressum  Edgars Auswahl  verschicken  verschicken  verschicken  verschicken   http

Re: [PHP] regular expressions help please

2002-04-30 Thread Jason Wong
On Tuesday 30 April 2002 19:43, John Fishworld wrote: > $imode_code = file("$url_file"); > $file_name = basename($url_file); > $path = dirname($url_file); > $stripped_path = eregi_replace("^(.{2,6}://)?[^/]*/", "", $path); > > On Tuesday 30 April 2002 19:17, John Fishworld wrote: > > > Okay righ

Re: [PHP] regular expressions help please

2002-04-30 Thread John Fishworld
$imode_code = file("$url_file"); $file_name = basename($url_file); $path = dirname($url_file); $stripped_path = eregi_replace("^(.{2,6}://)?[^/]*/", "", $path); $next_path = eregi_replace($stripped_path, "", $path); $next_path_1 = eregi_replace("/$" , "", $next_path); // create and open a file t

Re: [PHP] regular expressions help please

2002-04-30 Thread Jason Wong
On Tuesday 30 April 2002 19:17, John Fishworld wrote: > Okay right I'm experimenting with an i-mode parser ! > I copy the file (url entered) to a local location ! > Then read through the whole file line at a time and change/replace the > things that need replaceing ! > On of the things that I need

Re: [PHP] regular expressions help please

2002-04-30 Thread John Fishworld
Okay right I'm experimenting with an i-mode parser ! I copy the file (url entered) to a local location ! Then read through the whole file line at a time and change/replace the things that need replaceing ! On of the things that I need to replace is the links to the pictures so that they still show

Re: [PHP] regular expressions help please

2002-04-30 Thread Jason Wong
On Tuesday 30 April 2002 16:31, John Fishworld wrote: > I'm trying to find files in my array > for example > ="lg_imode.gif" > and > ="/db/imodeklein/edgar-IMODE-1-.gif" Perhaps you should clarify your problem. First of all does your array contain just gif files (ie *.gif) or does it contain all

RE: [PHP] regular expressions help please

2002-04-30 Thread Ford, Mike [LSS]
> -Original Message- > From: John Fishworld [mailto:[EMAIL PROTECTED]] > Sent: 30 April 2002 09:32 > > 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 > fron

[PHP] regular expressions help please

2002-04-30 Thread John Fishworld
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 as usual I' m having problems with the correct regex At the moment I'

Re: [PHP] regular expressions help please

2002-04-30 Thread Jason Wong
On Tuesday 30 April 2002 15:51, Ed Lazor wrote: > I've been banging my head against regular expressions all night... help > would be greatly appreciated. Could you give me examples on how to do the > following? Is this for a programming assignment/exercise? Do you /have/ to use regex? Other met

[PHP] regular expressions help please

2002-04-30 Thread Ed Lazor
I've been banging my head against regular expressions all night... help would be greatly appreciated. Could you give me examples on how to do the following? Pull everything except a specific word from a sentence. For example, pulling everything except the word run from "the water run was ste