Re: [PHP] Help with regular expressions

2006-01-19 Thread Richard Lynch
On Tue, January 17, 2006 1:54 pm, Carl Furst wrote: Ok I am so stumped.. I'm doing something stupid and I can't figure it out.. Here's the code: ?php $eml = '[EMAIL PROTECTED] ceo'; if (strpos($eml, ' ')) echo yep, there are spaces\n; //does strpos see the spaces? echo

[PHP] Help with regular expressions

2006-01-17 Thread Carl Furst
Ok I am so stumped.. I'm doing something stupid and I can't figure it out.. Here's the code: ?php $eml = '[EMAIL PROTECTED]ceo'; if (strpos($eml, ' ')) echo yep, there are spaces\n; //does strpos see the spaces? echo preg_replace('/\s/', '', $eml); //WTF? Preg_replace

Re: [PHP] Help with regular expressions

2006-01-17 Thread John Nichel
Carl Furst wrote: Ok I am so stumped.. I'm doing something stupid and I can't figure it out.. Here's the code: ?php $eml = '[EMAIL PROTECTED]ceo'; if (strpos($eml, ' ')) echo yep, there are spaces\n; //does strpos see the spaces? echo preg_replace('/\s/', '', $eml);

Re: [PHP] Help with regular expressions

2006-01-17 Thread Al
John Nichel wrote: Carl Furst wrote: Ok I am so stumped.. I'm doing something stupid and I can't figure it out.. Here's the code: ?php $eml = '[EMAIL PROTECTED]ceo'; if (strpos($eml, ' ')) echo yep, there are spaces\n; //does strpos see the spaces? echo

RE: [PHP] Help with regular expressions

2006-01-17 Thread php-mail
-- -Original Message- From: Al [mailto:[EMAIL PROTECTED] Sent: 17 January 2006 22:45 To: php-general@lists.php.net Subject: Re: [PHP] Help with regular expressions John Nichel wrote: Carl Furst wrote: Ok I am so stumped.. I'm doing something stupid and I can't figure it out.. Here's

Re: [PHP] Help with regular expressions

2006-01-17 Thread Al
Al wrote: John Nichel wrote: Carl Furst wrote: Ok I am so stumped.. I'm doing something stupid and I can't figure it out.. Here's the code: ?php $eml = '[EMAIL PROTECTED] ceo'; if (strpos($eml, ' ')) echo yep, there are spaces\n; //does strpos see the spaces?

[PHP] Help with Regular Expressions

2002-09-26 Thread Daren Cotter
I need to filter out certain characters from being stored in the database from our signup form. The fields include first name, last name, street address, city, zip, etc. Question 1: What characters should be allowed, other than lowercase, uppercase, digits, and the space character? Question 2:

RE: [PHP] Help with Regular Expressions

2002-09-26 Thread John Holmes
I need to filter out certain characters from being stored in the database from our signup form. The fields include first name, last name, street address, city, zip, etc. Question 1: What characters should be allowed, other than lowercase, uppercase, digits, and the space character? Some

[PHP] help condensing regular expressions

2002-04-05 Thread Tom Rogers
Hi I am trying to calculate how far into a directory structure I am so that I can include images and include files without having to hard code them. I need to turn $PHP_SELF which could be /admin/emails/index.php into ../../ which I can then use to get to any directory from root. like IMG

Re: [PHP] Help with regular expressions

2002-01-25 Thread DL Neil
Daniel, Hi! I´m new to regular expressions, and it seems to be an art to make it work as expected. I´m trying to remove all single-line comments from an string - that´s everything after // to the end of a line. I expected that this would do the job: ereg_replace(//[[:alnum:]]*\n,,$string),

[PHP] Help with regular expressions

2002-01-24 Thread José Daniel Ramos Wey
Hi! I´m new to regular expressions, and it seems to be an art to make it work as expected. I´m trying to remove all single-line comments from an string - that´s everything after // to the end of a line. I expected that this would do the job: ereg_replace(//[[:alnum:]]*\n,,$string), but it

Re: [PHP] Help with regular expressions

2002-01-24 Thread Jeff Sheltren
: Thursday, January 24, 2002 5:00 PM Subject: [PHP] Help with regular expressions Hi! I´m new to regular expressions, and it seems to be an art to make it work as expected. I´m trying to remove all single-line comments from an string - that´s everything after // to the end of a line. I expected

Re: [PHP] Help with regular expressions

2002-01-24 Thread Jeff Sheltren
this as your reg ex: //.* Hope that helps. -Jeff - Original Message - From: José Daniel Ramos Wey [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, January 24, 2002 5:00 PM Subject: [PHP] Help with regular expressions Hi! I´m new to regular expressions, and it seems

[PHP] HELP with Regular Expressions

2001-08-20 Thread Richard Kurth
I am having a little problem with Regular Expressions In the function below I am trying to make sure only these characters are being used in the hostname. If the hostname contains letters,digits,periods and minus signs then it is fine and we can let the process continue. If it has

Re: [PHP] Help w/ regular expressions for banned words

2001-01-20 Thread CC Zona
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Team JUMP) wrote: $num=count($bannedwords); for($i=0;$i$num-1;$i++) { $string = eregi_replace("\b$bannedwords[$i]\b","[censored]",$string); } For whatever reason, no word in

Re: [PHP] Help w/ regular expressions for banned words

2001-01-20 Thread Romulo Roberto Pereira
"BRBR"; // test the end word and exchange reset($bannedwords); foreach ($bannedwords as $word) { $string = eregi_replace("{$word}$","[censored]",$string); } echo $string."BRBR"; echo $dot."BR"; echo $hasdot; ? - Original Message - From: Team J