Sponsors
-
Recent Posts
Recent Comments
- [How to] - Multiple PHP version in Apache on PHP5 and PHP4 Running on SAME apache server
- Setting up PHPUnit with XAMPP | Ratatouille on PHPUnit Database Extension (DBUnit Port)
- Loading schema from SQL file, in PHPUnit test on PHPUnit Database Extension (DBUnit Port)
- Christof on Phake 1.0.0 is finished
- Camo Yoshi on Windows 98 Drivers for Dell Memory Key
Archives
- January 2012
- December 2010
- February 2009
- December 2008
- October 2008
- June 2008
- May 2008
- April 2008
- November 2007
- October 2007
- September 2007
- June 2007
- January 2007
- October 2006
- August 2006
- May 2006
- April 2006
- February 2006
- December 2005
- October 2005
- August 2005
- May 2005
- April 2005
- March 2005
- February 2005
- January 2005
- December 2004
- October 2004
- July 2004
- June 2004
Categories
Meta
Monthly Archives: April 2006
I <3 Regexs
I was toying around with regexs this morning and learned a few things I had just never taken the time to learn before. In any case, I came up with this: #((?:(?<!\\)\"(?:(?:(?:[\x20\x09]*[\r\n])?[\x20\x09]+)?(?:[\x01-\x08\x0b-\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|\\[\x01-\x09\x0b-\x0c\x0e-\x7f]))*(?:(?:[\x20\x09]*[\r\n])?[\x20\x09]+)?\"|[^"(]+|\\["(]|^)+)(?:(?:(?:(?:(?:[\x20\x09]*[\r\n])?[\x20\x09]+)?(?P<comment>\((?:(?:(?:[\x20\x09]*[\r\n])?[\x20\x09]+)?(?:[\x01-\x08\x0b-\x0c\x0e-\x1f\x7f\x21-\x27\x2a-\x5b\x5d-\x7e]|\\[\x01-\x09\x0b-\x0c\x0e-\x7f]|(?P>comment)))*(?:(?:[\x20\x09]*[\r\n])?[\x20\x09]+)?\)))+(?:(?:[\x20\x09]*[\r\n])?[\x20\x09]+)?|(?:[\x20\x09]*[\r\n])?[\x20\x09]+))# (of course ignoring line breaks.) An ‘atta boy’ … Continue reading
Posted in PHP
7 Comments