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:
>
>
> $eml = '[EMAIL PROTECTED]
> ceo';
> if (strpos($eml, ' ')) echo "yep, there are spaces\n"; //does strpos
> see the
> spaces?
> echo preg_re
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:
$eml = '[EMAIL PROTECTED]
ceo';
if (strpos($eml, ' ')) echo "yep, there are spaces\n"; //does strpos
see the
spaces?
echo pr
was spaceless (spaced out?)... maybe worth a try?
HTH
Dan
--
-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
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:
if (strpos($eml, ' ')) echo "yep, there are spaces\n"; //does strpos
see the
spaces?
echo preg_replace('/\s/', '', $eml); //WTF? Preg_replace does not?
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:
As you can see there are a bunch of spaces in that email address. I'm trying
to use preg_replace to get rid of them. Strpos sees the spaces and the first
echo statement is executed.
Ok I am so stumped.. I'm doing something stupid and I can't figure it out..
Here's the code:
As you can see there are a bunch of spaces in that email address. I'm trying
to use preg_replace to get rid of them. Strpos sees the spaces and the first
echo statement is executed. The second echo prin
> 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?
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: W
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"
ter 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: Thursday, January 24, 2002 5:00
IL 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 to be an art to make it
> work as expected.
>
> I´m trying to remove all "single-line" comments from an string - that´s
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), bu
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 unders
13 matches
Mail list logo