Page 1 of 1
PHP - Regular Expression
Posted: Thu Sep 09, 2004 2:28 am
by Cesar
Hi.
What can i check string in one expression.
"^[1-9][0-9]*$" and "^[0-9]+(-[0-9]+){1,2}$" expressions to marge and create the one expression.
Posted: Thu Sep 09, 2004 2:40 am
by m3mn0n
Can you explain more clearly what exactly your problem is, and what you want to accomplish? Thanks.
PHP Manual Info: [php_man]regex[/php_man]
Ok
Posted: Thu Sep 09, 2004 3:05 am
by Cesar
I like check string in one expression.
Can I or can not.
if i can while.
Posted: Thu Sep 09, 2004 3:33 am
by feyd
yes, you can check an entire string.
Posted: Thu Sep 09, 2004 3:46 am
by Cesar
how, can you explain?
Posted: Thu Sep 09, 2004 4:19 am
by feyd
your regexes have starting and ending anchors.. that tells the engine to match the entire string. any more explaination, and we'll need to know what you want to match.