Re: [PHP] For the RegExps gurus!

2001-09-21 Thread ~~~i LeoNid ~~
On Thu, 20 Sep 2001 10:37:58 +0200 impersonator of [EMAIL PROTECTED] (* R&Ze:) planted &I saw in php.general: >again. And believe me: IT'S A LOT OF RAIN HERE! > "Its raining back, Aleluia":) Like in UK reign in "foggy Albion":)? I can understand you, I used to live in St. Petersburg.. Or do you m

Re: [PHP] For the RegExps gurus!

2001-09-20 Thread
> Halo! Good to see you back:) Thanks :) Same here! ...oh... wait; _I_ was the one a was away... Well... anyway: good to be back! > >I've been away on vacation, so it's a bit late, but anyway... > > > Indeed late.. Had a good one? Yep! Sun in France io rain in Holland. But :( I'm back in the r

Re: [PHP] For the RegExps gurus!

2001-09-18 Thread ~~~i LeoNid ~~
On Mon, 17 Sep 2001 13:15:08 +0200 impersonator of [EMAIL PROTECTED] (* R&Ze:) planted &I saw in php.general: >Ehhh... hai! > Halo! Good to see you back:) >I've been away on vacation, so it's a bit late, but anyway... > Indeed late.. Had a good one? > >> You didn't. Actually please expose - tell

Re: [PHP] For the RegExps gurus!

2001-09-17 Thread
Ehhh... hai! I've been away on vacation, so it's a bit late, but anyway... > You didn't. Actually please expose - tell i tell i:). I am all ears:) I meant I improved my own versions, not you're version. That's why you can't find the improvement on you're code. If that's what you meant... > ?

Re: [PHP] For the RegExps gurus!

2001-09-07 Thread ~~~i LeoNid ~~
On Fri, 7 Sep 2001 09:39:37 +0200 impersonator of [EMAIL PROTECTED] (* R&Ze:) planted &I saw in php.general: > >From: ~~~i LeoNid ~~ <[EMAIL PROTECTED]> >Date: Thu, Sep 06, 2001 at 05:30:44PM + >Message-ID: <3b97b222.78196206@localhost> >Subject: Re: [PHP]

Re: [PHP] For the RegExps gurus!

2001-09-07 Thread
From: ~~~i LeoNid ~~ <[EMAIL PROTECTED]> Date: Thu, Sep 06, 2001 at 05:30:44PM + Message-ID: <3b97b222.78196206@localhost> Subject: Re: [PHP] For the RegExps gurus! > You can keep improving:) or you can use piece of my working (except for > $Harlem, to which i am not going

Re: [PHP] For the RegExps gurus!

2001-09-06 Thread ~~~i LeoNid ~~
On Wed, 5 Sep 2001 12:15:34 +0200 impersonator of [EMAIL PROTECTED] (* R&Ze:) planted &I saw in php.general: >This should do the job: > ... You can keep improving:) or you can use piece of my working (except for $Harlem, to which i am not going:) code (I give it for free this time:) No /me, no

Re: [PHP] For the RegExps gurus!

2001-09-06 Thread
And here is version 5.2! I optimized the search patterns. I found out that there was only a very limited scope of URL's that was matched... So I pretty much fixed that now (see the example). Repeating elements from the patterns have been extracted and put in an array, so that you can easily see t

Re: [PHP] For the RegExps gurus!

2001-09-06 Thread
Okay... this time an even better solution, without the /e modifier. Think this comes pretty close to some final solution. --- PHP code --- http://www.helloworld.com\n Hello world! ftp://ftp.server.com\n Hello world www.helloworld.com"; /* -- ! Fifth regexp ! -- */ $pattern = array ("~\s

Re: [PHP] For the RegExps gurus!

2001-09-06 Thread
Got another solution. So far the first solution not using the /e modifier. It's not realy the best solution, but I'm still trying to improve it. Getting closer every time... --- PHP code --- http://www.helloworld.com\n Hello world! ftp://ftp.server.com\n Hello world www.helloworld.com"; /*

Re: [PHP] For the RegExps gurus!

2001-09-06 Thread
From: _lallous <[EMAIL PROTECTED]> Date: Thu, Sep 06, 2001 at 02:28:03PM +0200 Message-ID: <[EMAIL PROTECTED]> Subject: Re: [PHP] For the RegExps gurus! > Thanks alot man! > > They are all still using /e switch... ;) Yep... still using /e switch. I'm not sure i

Re: [PHP] For the RegExps gurus!

2001-09-06 Thread _lallous
The reason I don't want to use the /e switch is that i'll be able to port that expression to perl or to javascript. "* R&Ze:" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > And another option... > > --- PHP code --- > > > $mem = "Hello world! http://www.hell

Re: [PHP] For the RegExps gurus!

2001-09-06 Thread _lallous
Thanks alot man! They are all still using /e switch... ;) "* R&Ze:" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > And another option... > > --- PHP code --- > > > $mem = "Hello world! http://www.helloworld.com\n > Hello world! ftp://ftp.server.com\n > Hello

Re: [PHP] For the RegExps gurus!

2001-09-06 Thread
And another option... --- PHP code --- http://www.helloworld.com\n Hello world! ftp://ftp.server.com\n Hello world www.helloworld.com"; /* -- ! First regexp ! -- */ // $mem = preg_replace ("/\s+([http:|ftp:]{0,1}\S+\.\S+)/me", "' \\1' // : 'http://\\1\";>http://\\1')", $mem

Re: [PHP] For the RegExps gurus!

2001-09-06 Thread
From: _lallous <[EMAIL PROTECTED]> Date: Thu, Sep 06, 2001 at 11:34:45AM +0200 Message-ID: <[EMAIL PROTECTED]> Subject: Re: [PHP] For the RegExps gurus! > > Ehh... no. How would you implement an if-statement then? > I thought I could have build a regexp that allow you

Re: [PHP] For the RegExps gurus!

2001-09-06 Thread _lallous
> Ehh... no. How would you implement an if-statement then? I thought I could have build a regexp that allow you to specify a default value of a subset if it was not matched... and it seems there is no way then! Thanks Renze. "* R&Ze:" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:

Re: [PHP] For the RegExps gurus!

2001-09-06 Thread
> Sort of yes > I thought it can be done with the /e modifier! Well... the /e modifier is used. But you have a different problem, you're matching over multiple lines. That's what the /m modifier is for. > Can't it be done with pure RegExps? Ehh... no. How would you implement an if-statemen

Re: [PHP] For the RegExps gurus!

2001-09-06 Thread _lallous
d, Sep 05, 2001 at 12:17:21PM +0200 > Message-ID: <[EMAIL PROTECTED]> > Subject: [PHP] For the RegExps gurus! > > > I want to write a RegExp that converts something like this: > > $mem = " > > Hello world! http://www.helloworld.com\n > > Hello world! ftp://ftp.s

Re: [PHP] For the RegExps gurus!

2001-09-05 Thread
From: _lallous <[EMAIL PROTECTED]> Date: Wed, Sep 05, 2001 at 12:17:21PM +0200 Message-ID: <[EMAIL PROTECTED]> Subject: [PHP] For the RegExps gurus! > I want to write a RegExp that converts something like this: > $mem = " > Hello world! http://www.helloworl

[PHP] For the RegExps gurus!

2001-09-05 Thread _lallous
I want to write a RegExp that converts something like this: $mem = " Hello world! http://www.helloworld.com\n Hello world! ftp://ftp.server.com\n Hello world www.helloworld.com" how can I write a single regexp that converts $mem to this: $mem = " Hello world! http://www.helloworld.com";>http://ww