For safety, I've deleted the point with regard to security concerns. Sorry for posting that before informing the author.
On 12月30日, 上午12時28分, DrunkenMonk <[email protected]> wrote: > Forward replacement: > $data = str_replace(array('\', "\n"), array("\\\0", '\n'), $data); > Backward replacement: > $data = str_replace(array('\n', "\\\0"), array("\n", '\'), $data); The above code gets a parser error. I thought what you meant to is to replace '\\' with "\x00", didn't you? > > ~data~ > name: data\ndata\data > name: data > > would now work. This would actually work without having to convert the > old pages. No, we have to convert all old pages with the data format below into the new ones. It solves the problem, but it causes a bad backward compatibility: ~data~ name: data data data ~ name: data > Other Notices #3: > I believe Xrename can rename according to a patern, thus allowing > multi-in and single-out. > Can't it? According to the source code, it doesn't accept a regexp pattern. What it may accept is page shortcut, including +, ^, ~, @, !, and ending #. It could make a multi-in and multi-out only when output pattern has ending # (thread). Well, it could be useful to replace a list of pages into a thread of pages like xxx.1000, xxx.1001, xxx.1002... but only this. Otherwise a multi-in single-out only renames only the first input page (if the out page doesn't exist) or doesn't rename anyone (if the out page exists). Maybe we can make it better by allowing a pattern to pattern rename for a multi page replacement. Multi-in with a csv format is not very useful since I could achieve this by combinding search function with single session rename, such as: [(search group=somegroup* template=rep)] /* [[#rep]] [(template first)][form][submit REPLACE] [(template each)][session rename_{+count} "{+p}|test.{+count}"] [(template last)][form] [[#]] */ -- You received this message because you are subscribed to the Google Groups "BoltWire" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/boltwire?hl=en.
