Re: [PHP] PHP script for detecting pattern sequences?

2009-07-08 Thread WenDong Zhang
yes (\d+?)\1+ works fine On Thu, Jul 9, 2009 at 6:00 AM, Per Jessen wrote: > Rob Gould wrote: > > > Can anyone tell me if there's a PHP library out there that will help > > me determine "pattern sequences" from a string? > > > > > > Example input: > > > > 032258064516129032258064516129032258064

Re: [PHP] Cleaning up automatically when leaving a page

2009-06-30 Thread WenDong Zhang
yes, the browser evoke unload event when leave the page (back, forward, or close). you can send a message via ajax, but it may not been received by the server successful, (when close the browser) I think the best way is maintaining a timestamp as michael & paul say, and clear the 'junk' timely. t

Re: [PHP] fixing new lines from in an email?

2009-06-26 Thread WenDong Zhang
how about preg_replace('/(\\n}\\r\\n)/', '', $_POST["problem"]); On Sat, Jun 27, 2009 at 12:50 AM, Adam Williams wrote: > > > Daniel Brown wrote: > >>In a cursory glance, I've noticed the following code: >> >> htmlspecialchars(nl2br(str_replace('\r','',$_POST["problem"]))) >> >>You are us

[PHP] Does php have multithread, shared object(like jsp application)

2009-06-25 Thread WenDong Zhang
Hi guys: Now days I want to develop a web application like a chat room. the requests per seconds maybe very large, so I want to save some common info into to memory (quick access). So, I want to know does php have the follow features or implement them in other ways. 1. server scope objects, mostl