Mike Gran <spk...@yahoo.com> writes: > I'm not much of a regex guy, but, here's a couple of examples. First > one that sort of works as expected. > > guile> (string-match "sé" "José") > ==> #("José" (2 . 5)) > > Regex properly matches the word, but, the match struct (2 . 5) is > referring to the bytes of the string, not the characters of the string.
That's with a UTF-8 locale, isn't it? With latin-1 I suppose the numbers would be (2 . 4), right? > Here's one that doesn't work as expected. > > guile> (string-match "[:lower:]" "Hi, mom") > ==> #("Hi, mom" (5 . 6)) > guile> (string-match "[:lower:]" "Hí, móm") > ==> #f > > Once you add accents on the vowels, nothing matches. > > Thanks, Thank you! Do you think it would be good to add these examples to the manual? (I'm happy to do that if so.) Neil