Previously, Zef Hemel said:
$string = preg_replace(/[\\\*\+\-;]/s,,$string);
I think, you might have to escape the ; too
You don't need to escape * or + inside a character class since they don't
have a special meaning inside a character class.
You will need to use '' to match a
Reiniger [mailto:[EMAIL PROTECTED]]
Subject: Re: [PHP] still not friends with RegExps..
On Tuesday 15 May 2001 22:35, Gyozo Papp wrote:
I mean that it seems to me most of the mailers use preg funtions
instead of simple ereg functions. Up to now I used only the latter
ones.
Well, actually
On Tuesday 15 May 2001 22:35, Gyozo Papp wrote:
I mean that it seems to me most of the mailers use preg funtions
instead of simple ereg functions. Up to now I used only the latter
ones.
Well, actually preg is more simple IMHO :)
Anyway - preg are the Perl-style regexps, so any perl regular
$string = preg_replace(/[\\\*\+\-;]/s,,$string);
I think, you might have to escape the ; too
Zef
elias [EMAIL PROTECTED] schreef in berichtnieuws
9dr733$knl$[EMAIL PROTECTED]
Hello,
Maybe RegExps are still my point of weakness...but I still like them as
much
as I like the Self-Reference
.
what reason for this behaviour?
- Original Message -
From: Taylor, Stewart [EMAIL PROTECTED]
To: 'elias' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: 2001. május 15. 15:16
Subject: RE: [PHP] still not friends with RegExps..
preg_replace does not seem to agree with '\\'.
Below seems to work
In article 00c301c0dd69$a64de040$6a45c5d5@jaguar,
[EMAIL PROTECTED] (Gyozo Papp) wrote:
There is a function quotemeta() which escapes all special regexp character
such as:
. \ + * ? [ ^ ] ( $ )
with a '\' except one the '|' pipe.
Forget quotemeta(). Use preg_quote() instead.
--
CC
PROTECTED]
Sent: 2001. május 15. 21:43
Subject: Re: [PHP] still not friends with RegExps..
In article 00c301c0dd69$a64de040$6a45c5d5@jaguar,
[EMAIL PROTECTED] (Gyozo Papp) wrote:
There is a function quotemeta() which escapes all special regexp character
it.
- Original Message -
From: CC Zona [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: 2001. május 15. 22:19
Subject: Re: [PHP] still not friends with RegExps..
In article 025c01c0dd7a$3b75d320$6a45c5d5@jaguar,
[EMAIL PROTECTED] (Gyozo Papp) wrote:
There is a function quotemeta() which
8 matches
Mail list logo