| > Regexp.PCRE("(\1234.).*n")->split2("p\1235ke \1234s fun"); | (4) Result: ({ /* 2 elements */ | "\1234s fun", | "\1234s" | }) | > Regexp.PCRE.split2("(\1234.).*n","p\1235ke \1234s fun"); | (2) Result: ({ /* 2 elements */ | "\1234s fun", | "\1234s" | }) | > Regexp.PCRE.split("(\1234.).*n","p\1235ke \1234s fun"); | (3) Result: ({ /* 1 element */ | "\1234s" | }) | > Regexp.PCRE.Plain("(\1234.).*n")->split2("p\1235ke \1234s fun"); | Bad argument 1 to pcre->create(). Expected string (8bit) | :-)
So, to check this in I need to move away Regexp like in the commented text. Any ideas?
/ Mirar
Previous text:
2003-09-24 09:25: Subject: foo
Nilsson, did you have any good way of inserting Regexp.PCRE?
I want to write the glue in lib/modules, but I'm getting fuzzed by the compilation orders (again). Is it supposed to work like this?
- I moved Regexp (the c+pike glue) to Regexp.Builtin,
using MODULE_INIT() location setting
- I make Regexp.pmod/module.pmod inherit Regexp.Builtin,
and then this happens:
| > Regexp("["); | Cannot call undefined lfun `(). | > indices(Regexp); | (1) Result: ({ /* 11 elements */ | "`()", ...and the rest that should be there... | "Builtin", | "module", | "___Builtin", | }) | > Regexp["`()"]("hej"); | (2) Result: Regexp.SimpleRegexp(hej)
There's nothing magical about the old Regexp module,
| SimpleRegexp `()(void|string regexp) { return SimpleRegexp(regexp); }
so what's going on? Why does `[] work but not `->?
/ Mirar