[PHP] regexps

2003-01-28 Thread Khalid El-Kary
I need to use regular expressions, but i found that the current Perl-compaitable API unuseful in my case, infact i need to get the positions of every match to the pattern and i found nothing in the Manual that does so, does any one know a way to do this (the only one i found is specific to PHP

Re: [PHP] regexps

2003-01-28 Thread 1LT John W. Holmes
I need to use regular expressions, but i found that the current Perl-compaitable API unuseful in my case, infact i need to get the positions of every match to the pattern and i found nothing in the Manual that does so, does any one know a way to do this (the only one i found is specific to

Re: [PHP] regexps

2003-01-28 Thread Khalid El-Kary
using any of the string functions on the output would ofcourse cause a performance drawback (do you agree with me?), i had used a combination of string functions to do instead of regexps, which one will be faster as you think ? where can i suggest such a function on the current regexps API ?

RE: [PHP] regexps

2003-01-28 Thread John W. Holmes
using any of the string functions on the output would ofcourse cause a performance drawback (do you agree with me?), i had used a combination of string functions to do instead of regexps, which one will be faster as you think ? It depends on exactly what your doing, how much text you have,

Re: [PHP] regexps

2003-01-28 Thread ng
using any of the string functions on the output would ofcourse cause a performance drawback (do you agree with me?), i had used a combination of string functions to do instead of regexps, which one will be faster as you think ? Hi, i made some basic bench and see that it really depends...

[PHP] regexps

2001-08-08 Thread Kurth Bemis
i need to find out if a string (user imputed) conatins numbers. I want only a-zA-Z to be in a field. (their name for exampleand city)...i have the following however my regexps are VERY weak as i am a beginner. function validatetext($text){ if (is_string($text)== 1){

RE: [PHP] regexps

2001-08-08 Thread scott [gts]
} if (preg_match('/\W+/', $data)) { print Contains non-alphanum!!; } -Original Message- From: Kurth Bemis [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 08, 2001 4:43 PM To: [EMAIL PROTECTED] Subject: [PHP] regexps i need to find out if a string (user imputed

Re: [PHP] regexps

2001-08-08 Thread CC Zona
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Scott) wrote: here are two regexps that might do what you want \w matches alphanum (1-9a-zA-z) (0-9a-zA-Z_) actually. Don't forget that zero and underscore! IMO, the best way to check for non-alphanum chars is to check for \W (upper case

Re: [PHP] regexps

2001-08-08 Thread Daniel James
: Wednesday, August 08, 2001 4:43 PM To: [EMAIL PROTECTED] Subject: [PHP] regexps i need to find out if a string (user imputed) conatins numbers. I want only a-zA-Z to be in a field. (their name for exampleand city)...i have the following however my regexps are VERY weak as i am

Re: [PHP] regexps

2001-01-16 Thread Romulo Roberto Pereira
Why don't you do a function with an ereg inside? I don't think that exist a command like that... Rom - Original Message - From: Elliot L. Tobin [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, January 16, 2001 11:59 AM Subject: [PHP] regexps Is there a way to call one regexp

Re: [PHP] regexps

2001-01-16 Thread Monte Ohrt
Most of the preg_ functions support arrays of values as input parameters. It's all in the documentation. "Elliot L. Tobin" wrote: Is there a way to call one regexp on multiple variables, in one statement? In Perl, I'd do: s/this/that for ($var1, $var2, $var3); tia.. and please reply

Re: [PHP] regexps

2001-01-16 Thread Toby Butzon
lity), you could say: foreach ($myArr as $myStr) $myStr = ereg_replace(...etc...); --Toby - Original Message - From: "Elliot L. Tobin" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, January 16, 2001 11:59 AM Subject: [PHP] regexps Is there a way to call one regexp o