Re: [PHP] regular expressions question

2008-03-07 Thread Richard Lynch
it. I tried the code you posted, for now it is blocking blank fields. Thank you - Original Message From: Richard Lynch [EMAIL PROTECTED] To: Adil Drissi [EMAIL PROTECTED] Cc: php-general@lists.php.net Sent: Tuesday, March 4, 2008 3:09:09 PM Subject: Re: [PHP] regular expressions

Re: [PHP] regular expressions question

2008-03-05 Thread It Maq
PROTECTED] To: Adil Drissi [EMAIL PROTECTED] Cc: php-general@lists.php.net Sent: Tuesday, March 4, 2008 3:09:09 PM Subject: Re: [PHP] regular expressions question On Tue, March 4, 2008 1:19 pm, Adil Drissi wrote: Is there any way to limit the user to a set of characters for example say i want my user

Re: [PHP] regular expressions question

2008-03-05 Thread Robert Cummings
- Original Message From: Richard Lynch [EMAIL PROTECTED] To: Adil Drissi [EMAIL PROTECTED] Cc: php-general@lists.php.net Sent: Tuesday, March 4, 2008 3:09:09 PM Subject: Re: [PHP] regular expressions question On Tue, March 4, 2008 1:19 pm, Adil Drissi wrote: Is there any way

[PHP] regular expressions question

2008-03-04 Thread Adil Drissi
Hi, Is there any way to limit the user to a set of characters for example say i want my user to enter any character between a and z (case insensitive). And if the user enters just one letter not belonging to [a-z], this will not be accepted. I tried eregi('[a-z]', $fname) but this allows the

Re: [PHP] regular expressions question

2008-03-04 Thread David Giragosian
On 3/4/08, Adil Drissi [EMAIL PROTECTED] wrote: Hi, Is there any way to limit the user to a set of characters for example say i want my user to enter any character between a and z (case insensitive). And if the user enters just one letter not belonging to [a-z], this will not be accepted.

Re: [PHP] regular expressions question

2008-03-04 Thread Daniel Brown
On Tue, Mar 4, 2008 at 2:19 PM, Adil Drissi [EMAIL PROTECTED] wrote: Hi, Is there any way to limit the user to a set of characters for example say i want my user to enter any character between a and z (case insensitive). And if the user enters just one letter not belonging to [a-z], this

Re: [PHP] regular expressions question

2008-03-04 Thread Richard Lynch
On Tue, March 4, 2008 1:19 pm, Adil Drissi wrote: Is there any way to limit the user to a set of characters for example say i want my user to enter any character between a and z (case insensitive). And if the user enters just one letter not belonging to [a-z], this will not be accepted. I

Re: [PHP] regular expressions question

2008-03-04 Thread Adil Drissi
Thank you guys, The answers you gave me not only solved the problem, but i included more characters like space and -. Thank you again --- Richard Lynch [EMAIL PROTECTED] wrote: On Tue, March 4, 2008 1:19 pm, Adil Drissi wrote: Is there any way to limit the user to a set of characters for

[PHP] regular expressions question

2002-10-30 Thread Simon Dedeyne
I have a little question. I'm having some difficulty with regular expressions: here it is: (this)example should be output in an array [0]= this [1]= thisexample I'm supposing this should be done with preg_grep, but I'm not really familiar with some of it's syntax for the regular expression. I

Re: [PHP] regular expressions question

2002-10-30 Thread Rasmus Lerdorf
$str = (this)example; preg_match(/\((.*?)\)(.*)/,$str,$regs); $a[0] = $regs[1]; $a[1] = $regs[1].$regs[2]; On Wed, 30 Oct 2002, Simon Dedeyne wrote: I have a little question. I'm having some difficulty with regular expressions: here it is: (this)example

Re: [PHP] regular expressions question

2002-10-30 Thread jla21
If I understand you correctly, I think you want this? $matches = array(); $test = (this)example; preg_match(/\((.*)\)(.*)/, $test, $matches); array_shift($matches); On Wed, 30 Oct 2002, Simon Dedeyne wrote: I have a little question. I'm having some difficulty with regular expressions:

Re: [PHP] regular expressions question

2002-10-30 Thread jla21
Whoops.. I missed one bit. Rasmus did it right. ;) On Wed, 30 Oct 2002 [EMAIL PROTECTED] wrote: If I understand you correctly, I think you want this? $matches = array(); $test = (this)example; preg_match(/\((.*)\)(.*)/, $test, $matches); array_shift($matches); On Wed, 30 Oct 2002,