[PHP-DEV] regcomp() From: Andi Gutmans (andi <email protected>)
Date: 09/28/00

Hi,

General question. I am writing something which I want to use glibc's regex
functions for.
Part of the regex depends on the users input so I want to make sure I
escape all of the users input so that it will always be seen by regcomp as
clear text.
When I don't don't escape the text everything works. If I escape the text
according to the \xFF way then it doesn't work. Both if I use regular and
extended flags.
Any ideas?

Works with regular C library regex: '\(^/foo/bar.*\)'
Doesn't work: '\(^\x2F\x66\x6F\x6F\x2F\x62\x61\x72.*\)'

Andi

---
Andi Gutmans <andi <email protected>>
http://www.zend.com/

-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>