Re: [PHP] still not friends with RegExps..

2001-05-22 Thread Dan Lowe
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

RE: [PHP] still not friends with RegExps..

2001-05-16 Thread scott [gts]
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

Re: [PHP] still not friends with RegExps..

2001-05-16 Thread Christian Reiniger
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

Re: [PHP] still not friends with RegExps..

2001-05-15 Thread Gyozo Papp
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

Re: [PHP] still not friends with RegExps..

2001-05-15 Thread CC Zona
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

RE: [PHP] still not friends with RegExps..

2001-05-15 Thread Jack Dempsey
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

Re: [PHP] still not friends with RegExps..

2001-05-15 Thread Gyozo Papp
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

Re: [PHP] still not friends with RegExps..

2001-05-15 Thread CC Zona
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.

Re: [PHP] still not friends with RegExps..

2001-05-15 Thread Gyozo Papp
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

RE: [PHP] still not friends with RegExps..

2001-05-15 Thread Taylor, Stewart
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

Re: [PHP] still not friends with RegExps..

2001-05-15 Thread Zef Hemel
$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-

[PHP] still not friends with RegExps..

2001-05-15 Thread elias
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