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
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
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 ?
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,
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...
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){
}
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
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
: 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
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
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
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
12 matches
Mail list logo