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 ba
istian 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
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
nd 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
In article <025c01c0dd7a$3b75d320$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
omfortable and won't playing
the guessing that i for one used to...
-jack
-Original Message-
From: Gyozo Papp [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 15, 2001 4:04 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] still not friends with RegExps..
Ok, now it's time to get famil
CTED]>
To: <[EMAIL 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
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.
except one the '|' pipe.
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 no
preg_replace does not seem to agree with '\\'.
Below seems to work with ereg_replace.
-Stewart
~
-Original Message-
From: elias [mailto:[EMAIL PROTECTED]]
Sent: 15 May 2001 23:37
To: [EMAIL PROTECTED]
Subject: [PHP] still not friends with RegExps..
Hello,
Maybe RegExps ar
$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-
Hello,
Maybe RegExps are still my point of weakness...but I still like them as much
as I like the Self-Reference phrases...
Okay now, how can i replace all the matches of "\" , "*", "+", "-" and ";"
with an empty string by calling once the preg_replace() or str_replace() or
any string replace fu
12 matches
Mail list logo