#[0-9a-zA-Z,.]#
2012/7/27 Ethan Rosenberg eth...@earthlink.net
Dear list -
I've tried everything and am still stuck.
A regex that will accept numbers, letters, comma, period and no other
characters
Thanks.
Ethan Rosenberg
--
PHP General Mailing List (http://www.php.net/)
To
On 27 Jul 2012, at 18:07, Ethan Rosenberg eth...@earthlink.net wrote:
I've tried everything and am still stuck.
A regex that will accept numbers, letters, comma, period and no other
characters
/^[0-9a-zA-Z,\.]+$/
-Stuart
--
Stuart Dallas
3ft9 Ltd
http://3ft9.com/
--
PHP General
Hi,
Am 27.07.2012 19:07, schrieb Ethan Rosenberg:
Dear list -
I've tried everything and am still stuck.
A regex that will accept numbers, letters, comma, period and no other
characters
This?
/^[0-9a-zA-Z,.]$/
Regards,
Sebastian
Thanks.
Ethan Rosenberg
--
PHP General Mailing
Simon Dániel simondan...@gmail.com wrote:
#[0-9a-zA-Z,\.]#
You should escape out that period as it will match any character otherwise.
Thanks,
Ash
http://ashleysheridan.co.uk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Fri, Jul 27, 2012 at 10:16 AM, Ashley Sheridan
a...@ashleysheridan.co.ukwrote:
Simon Dániel simondan...@gmail.com wrote:
#[0-9a-zA-Z,\.]#
You should escape out that period as it will match any character otherwise
The dot only matches a period inside a character class [...].
David
#[0-9a-zA-Z,\.]#
You should escape out that period as it will match any character otherwise.
Thanks,
Ash
Ash, Thats not true. In character class only meta-characters are \ ^ - [
and ]. This is the rule of PCRE (see
Am 27.07.2012 19:54, schrieb shiplu:
#[0-9a-zA-Z,\.]#
You should escape out that period as it will match any character otherwise.
Thanks,
Ash
Ash, Thats not true. In character class only meta-characters are \ ^ - [
And the dash only when it's not the first, or the last in the class.
-Original Message-
From: Camilo Sperberg [mailto:unrea...@gmail.com]
Sent: Tuesday, August 09, 2011 5:27 PM
For the first one, it may be that zend studio does have an internal script
to do the job. Check the general preferences tab, template stuff.
Nope. Nothing there. Those
On 10-08-2011, at 16:54, Daevid Vincent wrote:
-Original Message-
From: Camilo Sperberg [mailto:unrea...@gmail.com]
Sent: Tuesday, August 09, 2011 5:27 PM
For the first one, it may be that zend studio does have an internal script
to do the job. Check the general preferences tab,
For the first one, it may be that zend studio does have an internal script to
do the job. Check the general preferences tab, template stuff. Please note that
?= is also valid and should be replaced to ?php echo instead. Also the
short if version 1 == 1 ? True : false should be replaced if i'm
Le 19/02/2011 0:23, Tommy Pham a écrit :
@Simon,
Thanks for explaining about the [^href]. I need to read up more about
greediness. I thought I understood it but guess not.
@Peter,
I tried your pattern but it didn't capture all of my new test cases.
Also, it captures the single/double quotes
As far as I can tell, your problem lies in [^href]*. That will match any
characters other than h, r, e or f, not anything other than the string href.
Consider replacing it with [^]*?. The ? makes it non-greedy so it will stop as
soon as it can (when it matches the first href) rather than as
On 18 February 2011 22:36, Tommy Pham tommy...@gmail.com wrote:
Hi folks,
This is not directly relating to PHP but it's Friday so I'm gonna give
it a shot :). Would someone please help me figure out why my regex
pattern doesn't work. Below is the code and sample data:
$html = HTML
li
@Simon,
Thanks for explaining about the [^href]. I need to read up more about
greediness. I thought I understood it but guess not.
@Peter,
I tried your pattern but it didn't capture all of my new test cases.
Also, it captures the single/double quotes in addition to the
fragments inside the
On Sat, 2011-01-01 at 09:46 +, Lester Caine wrote:
A slightly more complex problem than phone numbers ...
It is a sort of convention to use the format 'JohnDoeSMITH' or 'John Doe
SMITH'
where each forename starts with a capital and the surname is in upper case. I
have a crude method
Ethan Rosenberg wrote:
FYI [to all the list] -- I thank all for their input. I only needed US
phones, and I am forcing the user of the form to conform to xxx-xxx-
as the input format.
out of interest, why are you forcing you're users to conform to that
input format? you could simply
At 07:11 AM 12/31/2010, Nathan Rixham wrote:
Ethan Rosenberg wrote:
FYI [to all the list] -- I thank all for their input. I only
needed US phones, and I am forcing the user of the form to conform
to xxx-xxx- as the input format.
out of interest, why are you forcing you're users to
Sorry for top-post, on phone.
What about mobile phone numbers (cell phones you call them in the US) do they
conform to the same format? I know there have been times myself when I've been
without a landline number leaving me with only my mobile as a means of contact.
Thanks,
Ash
At 09:27 AM 12/31/2010, a...@ashleysheridan.co.uk wrote:
Sorry for top-post, on phone.
What about mobile phone numbers (cell phones you call them in the
US) do they conform to the same format? I know there have been times
myself when I've been without a landline number leaving me with only
Ethan Rosenberg wrote:
At 07:11 AM 12/31/2010, Nathan Rixham wrote:
Ethan Rosenberg wrote:
FYI [to all the list] -- I thank all for their input. I only needed
US phones, and I am forcing the user of the form to conform to
xxx-xxx- as the input format.
out of interest, why are you
a...@ashleysheridan.co.uk wrote:
Sorry for top-post, on phone.
What about mobile phone numbers (cell phones you call them in the US)
do they conform to the same format?
AFAIK, they too vary from country to country. Swiss mobile numbers are
07[6789] NNN, the latter usually written as
On Fri, Dec 31, 2010 at 11:04, Per Jessen p...@computer.org wrote:
AFAIK, they too vary from country to country. Swiss mobile numbers are
07[6789] NNN, the latter usually written as NNN NN NN, but also
often in a way that will help remembering the number.
Danish mobile#s are the same as
I guess, this will work fine
ereg('[0-9]{3}-[0-9]{3}-[0-9]{4}', $phone_number);
On Thu, Dec 30, 2010 at 2:12 AM, Ethan Rosenberg eth...@earthlink.netwrote:
Dear List -
Thank you for all your help in the past.
Here is another one
I would like to have a regex which would validate
On Fri, Dec 31, 2010 at 12:05, Dmitriy Ugnichenko
mitya.ugniche...@gmail.com wrote:
I guess, this will work fine
ereg('[0-9]{3}-[0-9]{3}-[0-9]{4}', $phone_number);
Not quite. Plus, all ereg* functions have been deprecated for
some time now.
--
/Daniel P. Brown
Network Infrastructure
On Wed, 2010-12-29 at 19:35 -0500, Daniel P. Brown wrote:
On Wed, Dec 29, 2010 at 19:12, Ethan Rosenberg eth...@earthlink.net wrote:
Dear List -
Thank you for all your help in the past.
Here is another one
I would like to have a regex which would validate that a telephone
On 12/29/2010 4:35 PM, Daniel P. Brown wrote:
On Wed, Dec 29, 2010 at 19:12, Ethan Rosenberg eth...@earthlink.net wrote:
Dear List -
Thank you for all your help in the past.
Here is another one
I would like to have a regex which would validate that a telephone number
is in the format
On Fri, Dec 31, 2010 at 19:09, Jim Lucas li...@cmsws.com wrote:
Actually...
Specified here [1] it says that the {1,} is the same as '+'. I think you
should
drop the comma. If you don't this would be valid 844-2345-123456
^[2-9]{1,}[0-9]{2,}\-[2-9]{1,}[0-9]{2,}\-[0-9]{4,}$
should be
At 07:27 PM 12/29/2010, Josh Kehn wrote:
On Dec 29, 2010, at 7:12 PM, Ethan Rosenberg eth...@earthlink.net wrote:
Dear List -
Thank you for all your help in the past.
Here is another one
I would like to have a regex which would validate that a
telephone number is in the format
On Thu, Dec 30, 2010 at 14:07, Ethan Rosenberg eth...@earthlink.net wrote:
Josh -
I used use \d{3}-\d{3}-\d{4}.
It works beautifully!!
Just keep in mind that invalid numbers will also pass that check,
such as 000-000- or 123-456-6789. That's why my example was a bit
more involved.
On Dec 29, 2010, at 6:12 PM, Ethan Rosenberg wrote:
I would like to have a regex which would validate that a telephone
number is in the format xxx-xxx-.
http://lmgtfy.com/?q=regex+to+validate+US+phone+numbers
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
I suggest you try javascript.
Richard L. Buskirk
-Original Message-
From: Ethan Rosenberg [mailto:eth...@earthlink.net]
Sent: Wednesday, December 29, 2010 7:12 PM
To: php-db-lists.php.net; php-general@lists.php.net
Subject: [PHP] Regex for telephone numbers
Dear List -
Thank you for
On 30/12/2010, at 1:12 PM, Ethan Rosenberg wrote:
Dear List -
Thank you for all your help in the past.
Here is another one
I would like to have a regex which would validate that a telephone number is
in the format xxx-xxx-.
Thanks.
Ethan
MySQL 5.1 PHP 5 Linux
Also remove your stupid Email filter.
If you need a email filter, you should not be on this list or learn to setup
rules one.
Richard L. Buskirk
-Original Message-
From: Ethan Rosenberg [mailto:eth...@earthlink.net]
Sent: Wednesday, December 29, 2010 7:12 PM
To: php-db-lists.php.net;
On Dec 29, 2010, at 7:12 PM, Ethan Rosenberg eth...@earthlink.net wrote:
Dear List -
Thank you for all your help in the past.
Here is another one
I would like to have a regex which would validate that a telephone number is
in the format xxx-xxx-.
Thanks.
Ethan
Hi Ethan,
Could you do a string compare and check at certain characters for a
dash?
IE:
check the second character to see if it is a dash for 1-800...
if that is not a dash, check the fourth character for a dash, 469-9...
then the other places where dashes would be based on those two
You could also help them out a little with something like..
$phone = str_replace((, , $phone);
$phone = str_replace(), -, $phone);
HTH,
Karl
On Dec 29, 2010, at 6:27 PM, Josh Kehn wrote:
On Dec 29, 2010, at 7:12 PM, Ethan Rosenberg eth...@earthlink.net
wrote:
Dear List -
Thank you
Why not have three separate fields for each part, as that way you don't
need to bother about how the user separates them, as trust me, if they
can break it, they will.
I have found it is best to always limit the amount of free entry you
permit a user, as that will drastically cut back in data
On Wed, Dec 29, 2010 at 19:12, Ethan Rosenberg eth...@earthlink.net wrote:
Dear List -
Thank you for all your help in the past.
Here is another one
I would like to have a regex which would validate that a telephone number
is in the format xxx-xxx-.
Congrats. People in Hell
Brad Fuller wrote:
I'm looking for a regular expression to accomplish a specific task.
I'm hoping someone who's really good at regex patterns can lend a quick hand.
I need a regex pattern that will grab URLs out of HTML that have a
certain link text. (i.e. the word Continue)
This is
On Fri, 2009-10-23 at 13:23 -0400, Brad Fuller wrote:
I'm looking for a regular expression to accomplish a specific task.
I'm hoping someone who's really good at regex patterns can lend a quick hand.
I need a regex pattern that will grab URLs out of HTML that have a
certain link text.
On Fri, Oct 23, 2009 at 1:28 PM, Ashley Sheridan
a...@ashleysheridan.co.ukwrote:
On Fri, 2009-10-23 at 13:23 -0400, Brad Fuller wrote:
I'm looking for a regular expression to accomplish a specific task.
I'm hoping someone who's really good at regex patterns can lend a quick hand.
I need a
On Fri, 2009-10-23 at 13:45 -0400, Brad Fuller wrote:
On Fri, Oct 23, 2009 at 1:28 PM, Ashley Sheridan
a...@ashleysheridan.co.ukwrote:
On Fri, 2009-10-23 at 13:23 -0400, Brad Fuller wrote:
I'm looking for a regular expression to accomplish a specific task.
I'm hoping someone who's
On Fri, Oct 23, 2009 at 1:48 PM, Ashley Sheridan
a...@ashleysheridan.co.ukwrote:
On Fri, 2009-10-23 at 13:45 -0400, Brad Fuller wrote:
On Fri, Oct 23, 2009 at 1:28 PM, Ashley Sheridan
a...@ashleysheridan.co.ukwrote:
On Fri, 2009-10-23 at 13:23 -0400, Brad Fuller wrote:
I'm
On Fri, Oct 23, 2009 at 1:48 PM, Ashley Sheridan
a...@ashleysheridan.co.ukwrote:
On Fri, 2009-10-23 at 13:45 -0400, Brad Fuller wrote:
On Fri, Oct 23, 2009 at 1:28 PM, Ashley Sheridan
a...@ashleysheridan.co.ukwrote:
On Fri, 2009-10-23 at 13:23 -0400, Brad Fuller wrote:
I'm looking
On Fri, Oct 23, 2009 at 1:54 PM, Israel Ekpo israele...@gmail.com wrote:
On Fri, Oct 23, 2009 at 1:48 PM, Ashley Sheridan a...@ashleysheridan.co.uk
wrote:
On Fri, 2009-10-23 at 13:45 -0400, Brad Fuller wrote:
On Fri, Oct 23, 2009 at 1:28 PM, Ashley Sheridan
On Fri, Oct 23, 2009 at 01:54:40PM -0400, Brad Fuller wrote:
Thanks Ash you are awesome!
Brad, you're violating list rules. We never say that kind of thing to
Ash *where he can hear it*. Only behind his back. ;-}
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To
On Fri, 2009-10-23 at 15:17 -0400, Paul M Foster wrote:
On Fri, Oct 23, 2009 at 01:54:40PM -0400, Brad Fuller wrote:
Thanks Ash you are awesome!
Brad, you're violating list rules. We never say that kind of thing to
Ash *where he can hear it*. Only behind his back. ;-}
Paul
--
You are replacing 1 or more matchs of a new line. To match 2 or more you can
use {2,}. It's a range, first number means min matches, second max matches.
Omitting last number means no max limit.
$data[txt] = preg_replace('`[\r\n]{2,}`',\n,$data[txt]);
De:
That sounds very logical but does not work unfortunatelly.
The result is the same. It removes all linebreakes but one.
I would like to pass this one:
-
first line
second
third
-
But not this one:
-
third
forth
Fernando Castillo Aparicio schrieb:
You are
On Wed, 2009-10-14 at 12:42 +0200, Merlin Morgenstern wrote:
That sounds very logical but does not work unfortunatelly.
The result is the same. It removes all linebreakes but one.
I would like to pass this one:
-
first line
second
third
-
But not this one:
a...@ashleysheridan.co.uk
Para: Merlin Morgenstern merli...@fastmail.fm
CC: php-general@lists.php.net
Enviado: mié,14 octubre, 2009 12:44
Asunto: Re: [PHP] regex for multiple line breakes
On Wed, 2009-10-14 at 12:42 +0200, Merlin Morgenstern wrote:
That sounds very logical but does not work
Ashley Sheridan schrieb:
On Wed, 2009-10-14 at 12:42 +0200, Merlin Morgenstern wrote:
That sounds very logical but does not work unfortunatelly.
The result is the same. It removes all linebreakes but one.
I would like to pass this one:
-
first line
second
third
-
But not
Hi Merlin,
I think the pattern you're looking for is '/[a-zA-Z0-9]/' which will
match all alphanumeric characters.
Cheers
Stuart
On 30 Jul 2009, at 19:13, Merlin Morgenstern wrote:
Hi there,
I am trying to filter out content that is not ascii. Can I do this
with regex? For example:
Merlin Morgenstern wrote:
Hi there,
I am trying to filter out content that is not ascii. Can I do this with
regex? For example:
$regex = '[AZ][09]';
if (preg_match($regex, $text)) {
return TRUE;
}
else {
return FALSE;
}
The reason I need to do
Merlin Morgenstern wrote:
Hi there,
I am trying to filter out content that is not ascii. Can I do this with
regex? For example:
$regex = '[AZ][09]';
if (preg_match($regex, $text)) {
return TRUE;
}
else {
return FALSE;
}
The reason I need to do
Have you tried escaping the : with a \?
Like:
mb_ereg_replace('^(.*)this is the test\: replace(.*)$', '', $contents
,'UTF-8');
Also, have you tried removing the : and adjusting the input string to
verify your belief that it's the :?
HTH,
Kyle
-Original Message-
From: Merlin Morgenstern
2009/4/22 kyle.smith kyle.sm...@inforonics.com:
Have you tried escaping the : with a \?
Like:
mb_ereg_replace('^(.*)this is the test\: replace(.*)$', '', $contents
,'UTF-8');
Also, have you tried removing the : and adjusting the input string to
verify your belief that it's the :?
HTH,
Richard Quadling wrote:
2009/4/22 kyle.smith kyle.sm...@inforonics.com:
Have you tried escaping the : with a \?
Like:
mb_ereg_replace('^(.*)this is the test\: replace(.*)$', '', $contents
,'UTF-8');
Also, have you tried removing the : and adjusting the input string to
verify your belief
jesse.ha...@arvatousa.com schreef:
Hi,
Brand new to regex. So I have a cli which runs a regex on users input,
to make sure that only 0-9 and A-Z are accepted. It should strip
everything else. My problem is that when you press control-Z (on
Windows; I have not yet tested this on linux,
From: Nitsan Bin-Nun
If you can point me on the character which control-z creates it would
make
it easier, I have no idea of it ;)
On Thu, Mar 26, 2009 at 11:06 PM, jesse.ha...@arvatousa.com wrote:
Thanks again. Sad to say, same result.
The second option looped an error: Warning:
Hazen
-Original Message-
From: Jochem Maas [mailto:joc...@iamjochem.com]
Sent: Thursday, March 26, 2009 11:45 PM
To: Hazen, Jesse, arvato digital services llc
Cc: php-general@lists.php.net
Subject: Re: [PHP] Regex
jesse.ha...@arvatousa.com schreef:
Hi,
Brand new to regex. So I have
, 2009 5:23 PM
To: Hazen, Jesse, arvato digital services llc; php-general@lists.php.net
Subject: RE: [PHP] Regex
hi...
if you haven't solved your issue... can you tell me in detail what
you're trying to accomplish? what are the steps to running the script?
thanks
-Original Message-
From
: php-general@lists.php.net
Subject: Re: [PHP] Regex
jesse.ha...@arvatousa.com schreef:
Hi,
Brand new to regex. So I have a cli which runs a regex on users input,
to make sure that only 0-9 and A-Z are accepted. It should strip
everything else. My problem is that when you press control-Z
On Fri, Mar 27, 2009 at 9:40 AM, Shawn McKenzie nos...@mckenzies.net wrote:
I'm normally OK with regex, especially if I fiddle with it long enough,
however I have fiddled with this one so long that I'm either totally
missing it or it's something simple. Does it have anything to do with
the
haliphax wrote:
On Fri, Mar 27, 2009 at 9:40 AM, Shawn McKenzie nos...@mckenzies.net wrote:
I'm normally OK with regex, especially if I fiddle with it long enough,
however I have fiddled with this one so long that I'm either totally
missing it or it's something simple. Does it have anything
To filter out everything which is not A-Z, a-z and 0-9 try this regex:
$str = preg_replace(#[^a-zA-Z0-9]+#is, , $str);
On Thu, Mar 26, 2009 at 10:23 PM, jesse.ha...@arvatousa.com wrote:
Hi,
Brand new to regex. So I have a cli which runs a regex on users input,
to make sure that only 0-9
, 2009 1:44 PM
To: Hazen, Jesse, arvato digital services llc
Cc: php-general@lists.php.net
Subject: Re: [PHP] Regex
To filter out everything which is not A-Z, a-z and 0-9 try this regex:
$str = preg_replace(#[^a-zA-Z0-9]+#is, , $str);
On Thu, Mar 26, 2009 at 10:23 PM, jesse.ha...@arvatousa.com
*To:* Hazen, Jesse, arvato digital services llc
*Cc:* php-general@lists.php.net
*Subject:* Re: [PHP] Regex
To filter out everything which is not A-Z, a-z and 0-9 try this regex:
$str = preg_replace(#[^a-zA-Z0-9]+#is, , $str);
On Thu, Mar 26, 2009 at 10:23 PM, jesse.ha...@arvatousa.com
] On Behalf Of
Nitsan Bin-Nun
Sent: Thursday, March 26, 2009 1:58 PM
To: Hazen, Jesse, arvato digital services llc
Cc: php-general@lists.php.net
Subject: Re: [PHP] Regex
I have no idea about this control-Z thing, you might want to try it with
UTF (just add the 'u' modificator):
$str = preg_replace
digital services llc
*Cc:* php-general@lists.php.net
*Subject:* Re: [PHP] Regex
I have no idea about this control-Z thing, you might want to try it with
UTF (just add the 'u' modificator):
$str = preg_replace(#[^a-zA-Z0-9]+#uis, , $str);
Or try this:
$str = preg_replace(#(\b[^a-zA-Z0-9]\b
it.
Thanks,
Jesse Hazen
From: nit...@binnun.co.il [mailto:nit...@binnun.co.il] On Behalf Of
Nitsan Bin-Nun
Sent: Thursday, March 26, 2009 2:09 PM
To: Hazen, Jesse, arvato digital services llc
Cc: php-general@lists.php.net
Subject: Re: [PHP] Regex
If you can point
: jesse.ha...@arvatousa.com [mailto:jesse.ha...@arvatousa.com]
Sent: Thu 3/26/2009 2:17 PM
To: nitsa...@gmail.com
Cc: php-general@lists.php.net
Subject: RE: [PHP] Regex
Nitsan,
Not a problem, thanks for the help. So, it is printed as ^Z. However, I
created a little test.php script to accept input
hi...
if you haven't solved your issue... can you tell me in detail what you're
trying to accomplish? what are the steps to running the script?
thanks
-Original Message-
From: jesse.ha...@arvatousa.com [mailto:jesse.ha...@arvatousa.com]
Sent: Thursday, March 26, 2009 1:23 PM
To:
jesse.ha...@arvatousa.com wrote:
Nistan,
Just got home, tested on linux. No problem on linux, the control-z just
exits. I may just go ahead and post my issue to the PHP windows list to see
if anything comes up, and not worry if it doesnt. I appreciate the help very
much
Thanks,
-Original Message-
From: MikeP [mailto:mpel...@princeton.edu]
Sent: Thursday, December 18, 2008 8:43 AM
To: php-general@lists.php.net
Subject: [PHP] Regex Problem
Hello,
I have a quirky behavior I'm trying to resolve.
I have a REGEX that will find a function definition in a php
Boyd, Todd M. tmbo...@ccis.edu wrote in message
news:33bde0b2c17eef46acbe00537cf2a190037b7...@exchcluster.ccis.edu...
-Original Message-
From: MikeP [mailto:mpel...@princeton.edu]
Sent: Thursday, December 18, 2008 8:43 AM
To: php-general@lists.php.net
Subject: [PHP] Regex Problem
For a Form Validation process, I need a function to avoid Latin characters
to be provided as the first or last name. Since we expect our users to
enter their personal info in Persian.
Do you know any regular expression to provide this functionality?
1) Regex to check whether there are Latin
Hi Behzad,
I would try a different approach ...
EXAMPLE (UTF-8):
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
html xmlns=http://www.w3.org/1999/xhtml;
head
meta http-equiv=Content-Type content=text/html; charset=utf-8 /
Thanks everyone. I guess I find the answer:
*// return true if the $str ONLY consists of Arabic characters and
space-character
public function isArabicString($str)
{
return preg_match('/^([\p{Arabic}]|\s)*$/u', $str);
}
*
PHP 5.1.x or higher is required.
@see:
After ceo posted about the imap function I was eager to try it out
and got rather disappointed pretty soon.
imap_rfc822_parse_adrlist() should not be used for email validation!
EXAMPLE:
?php
var_dump(imap_rfc822_parse_adrlist('! # $ % * + - / = ? ^ _ ` { |
} ~', ''));
?
The above code will
var_dump(imap_rfc822_parse_adrlist('! # $ % * + - / = ? ^ _ ` { | } ~',
''));
This looks like a valid localhost email address to me...
What's wrong with it?
:-v
You may want to check that host is non-empty, if you do not expect any
localhost users, and fail on that condition,
ceo wrote:
var_dump(imap_rfc822_parse_adrlist('! # $ % * + - / = ? ^ _ ` { | } ~',
''));
This looks like a valid localhost email address to me...
It surely is a valid localhost email address, but what most people
(and the OP) usually need is to validate a full email string with a
local and a
On Tue, Oct 28, 2008 at 8:57 PM, VamVan [EMAIL PROTECTED] wrote:
SSO process:
$_POST the Email Address and password
Get Authenticated, Get the COOKIE ( Through Oracle IDM suite SOAP call)
Decrypt the COOKIE ( Through Oracle Enterprise business suite SOAP call)
and get the profile Info
When it comes to email validation, I would recommend using the IMAP function
which will be both fast and correct:
http://us.php.net/manual/en/function.imap-rfc822-parse-adrlist.php
Otherwise, it's guaranteed that you are having at least some false positives,
and probably some false
On Wed, Oct 29, 2008 at 5:36 AM, [EMAIL PROTECTED] wrote:
When it comes to email validation, I would recommend using the IMAP function
which will be both fast and correct:
http://us.php.net/manual/en/function.imap-rfc822-parse-adrlist.php
Otherwise, it's guaranteed that you are having at
On Tue, Oct 28, 2008 at 4:10 PM, VamVan [EMAIL PROTECTED] wrote:
Hello Team of Nerds,
I need help in writing a regular expression for this:
invalid character set is:
INVALID_STRING={/,*,+,(,),'\',:,;,~,..,.@,@.};
Then you need to STFW and RTFM. PHP uses Perl-style regexp's, by the
Hello Team of Nerds,
Not the best way to start your request for help.
I need help in writing a regular expression for this:
invalid character set is:
INVALID_STRING={/,*,+,(,),'\',:,;,~,..,.@,@.};
I want to a pregmatch for these characters on my whole email address and if
match is
VamVan wrote:
Hello Team of Nerds,
I need help in writing a regular expression for this:
invalid character set is:
INVALID_STRING={/,*,+,(,),'\',:,;,~,..,.@,@.};
I want to a pregmatch for these characters on my whole email address and if
match is found I need to return false.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Richard Heyes
Sent: Tuesday, October 28, 2008 4:30 PM
To: VamVan
Cc: php List
Subject: Re: [PHP] Regex validation
Hello Team of Nerds,
Not the best way to start your request for help.
I
If your trying to filter E-Mail addresses, then filter_var is what you
should use:
http://php.net/filter_var
If the OP (original poster) got PHP5+
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Good to know filter_var() exists in PHP5
Unless you have PHP5 you better validate the string in the way of checking
if it is fit's to your allowed characters and not checking if it contains
the NOT allowed charaters.
You better use: [a-z0-9A-Z\_\.]+ instead of [^\)\(\*\[EMAIL PROTECTED] and I
Thank Guys,
I at least got part of it working , not the double words but almost
everything else than that:
function _email_validate($mail_address){
$invalid_charset_pattern = [(*+?)|~:;{}/ ];
if(ereg($invalid_charset_pattern, $mail_address)){
return false;
}else{
return true;
}
}
Keep in mind that ereg will disappear with PHP 6. You might want to use
the preg functions:
http://www.making-the-web.com/2007/09/21/becoming-php-6-compatible/
Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com
VamVan wrote:
Thank Guys,
I at least got part
On Tue, 2008-10-28 at 18:07 -0500, Micah Gersten wrote:
Keep in mind that ereg will disappear with PHP 6. You might want to use
the preg functions:
http://www.making-the-web.com/2007/09/21/becoming-php-6-compatible/
Thank you,
Micah Gersten
onShore Networks
Internal Developer
Yeah, I understand that its allowed in RFC. But unfortunately I use SSO
layer which decrypts the Cookie to get email address.
This is where it messes up. So I have decided not to allow people to use
that as well.
Thanks
On Tue, Oct 28, 2008 at 5:10 PM, Ashley Sheridan
[EMAIL PROTECTED]wrote:
VamVan a écrit :
This is where it messes up. So I have decided not to allow people to use
that as well.
By that way, you're making a lot of ennemies on this very list :D
--
Mickaël Wolff aka Lupus Michaelis
http://lupusmic.org
--
PHP General Mailing List (http://www.php.net/)
To
What are you talking about with a cookie and an E-Mail address?
Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com
VamVan wrote:
Yeah, I understand that its allowed in RFC. But unfortunately I use
SSO layer which decrypts the Cookie to get email address.
SSO process:
$_POST the Email Address and password
Get Authenticated, Get the COOKIE ( Through Oracle IDM suite SOAP call)
Decrypt the COOKIE ( Through Oracle Enterprise business suite SOAP call)
and get the profile Info
Thats what happens now.
But there is a glitch in the decryption
How is anything but your webserver decrypting the $_POST data? PHP
should get it after that as is.
Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com
VamVan wrote:
SSO process:
$_POST the Email Address and password
Get Authenticated, Get the COOKIE (
-Original Message-
From: Jason Pruim [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 09, 2008 7:30 AM
To: PHP-General List
Subject: [PHP] Regex help
Hey everyone,
Not completely specific to php but I know you guys know regex's
better then I do! :)
I am attempting to match
1 - 100 of 564 matches
Mail list logo