If I could wish, I think I'd wish for an alternative string syntax in Pike, that doesn't use \ to quote. It's so hairy writing advanced regexps if you have to quote the . :)
Is it a bad idea? It should be quote possible to do, if we could spare some syntax for it (and maybe figure out another quote character).
/ Mirar
Previous text:
2003-09-21 12:43: Subject: Re: bug: casts to string for long double and long long int are incorrect (7.4.28 rel)
As for UTF-8, here's some results:
object o=_Regexp_PCRE._pcre("b.d",_Regexp_PCRE.OPTION.UTF8); o->exec(string_to_utf8("\34429b\1234d\123132"));
(13) Result: ({ /* 2 elements */ 3, 7 })
map(_Regexp_PCRE.split_subject(string_to_utf8("\34429b\1234d\123132"),o->exec(string_to_utf8("\34429b\1234d\123132"))),utf8_to_string);
(16) Result: ({ /* 1 element */ "b\1234d" })
so it seems it gives indexes to the matching byte offsets, and not character offsets. Is there any convenience function for figuring out real character offsets from byte offsets in an utf8-encoded string?
/ Mirar