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
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);
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
--
-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
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?
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
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),
I think your problem is you are not including whitespace. Also, remember
that . (dot) means any character except newline, so why not try this as your
reg ex:
//.*
Hope that helps.
-Jeff
- Original Message -
From: José Daniel Ramos Wey [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent:
Sorry, I forgot the newline at the end... your reg ex should look like:
//.*\n
making your command be:
ereg_replace(//.*\n,,$string)
Try that ;)
Jeff
I think your problem is you are not including whitespace. Also, remember
that . (dot) means any character except newline, so why not try
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
"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
11 matches
Mail list logo