Page 1 of 1

counting number of characters b/w spaces

Posted: Tue Aug 21, 2007 12:04 am
by dev_net
Hi all,
I have this problem which i am not sure how can i accomplish using pcre. I need to calculate if two strings lengths are same. In other words i want to know the character count of strings? How can i accomplish this? Thanks in advance.

Posted: Tue Aug 21, 2007 12:08 am
by Christopher

Posted: Tue Aug 21, 2007 12:13 am
by dev_net
Thanks. But i need to implement this in pcre :( . I need to see if two strings are of equal length.

Posted: Tue Aug 21, 2007 2:37 am
by GeertDD
Could you give an example of exactly how you want to 'implement strlen() into PCRE'?

Why not match the two parts and then check if strlen($match[1]) == strlen($match[2])?

Posted: Tue Aug 21, 2007 3:58 am
by dev_net
actually i am using pcre regex with snort. And in snort i can only use pcre for expression matching.