On 11/1/06, Dan <[EMAIL PROTECTED]> wrote:
Hi folks,I thought string-match (in unit regex) was supposed to match a regexp at the beginning of a string, while string-search would *search* for that regexp. At least that's what the manual seems to say. But csi> (string-match (regexp "(a*)(b*)") "xxaabb") ("" "" "") csi> (string-search (regexp "(a*)(b*)") "xxaabb") ("" "" "") csi> (string-search (regexp "(a*)(b*)") "aabb") ("aabb" "aa" "bb")
The regular expression (a*)(b*) matches the empty string. Replacing "*" with "+" will make your example work. cheers, felix -- http://galinha.ucpel.tche.br:8081/blog/blog.ssp _______________________________________________ Chicken-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/chicken-users
