PDA

View Full Version : Pcre query



helloneo
12-29-2008, 04:40 AM
pattern = ^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$ ;

subject = <div id=\"cartPop_content\" style=\"display: none\"><div style=\"background-color: white\"><table width=\"300\"><tr><td><table cellspacing=\"0\" cellpadding=\"0\" border=\"0\"><tr><td width=\"100%\" colspan=\"2\">&nbsp;</td></tr><tr><td width=\"10\"><img src=\"http://g-ecx.images-amazon.com/images/G/01/x-locale/common/transparent-pixel._V42752373_.gif\" width=\"10\" alt=\"\" height=\"23\" border=\"0\" /></td><td width=\"100%\"><p>Your cart is empty, but it lives to serve.<p>Fill it with <a href=\"/books-used-books-textbooks/b/ref=gno_cartgw_pop?ie=UTF8&node=283155\">books</a>, <a href=\"/music-rock-classical-pop-jazz/b/ref=gno_cartgw_pop?ie=UTF8&node=5174\">music</a>, <a href=\"/grocery-breakfast-foods-snacks-organic/b/ref=gno_cartgw_pop?ie=UTF8&node=16310101\">groceries</a>, <a href=\"/apparel-accessories-men-women-kids/b/ref=gno_cartgw_pop?ie=UTF8&node=1036592\">apparel</a>, <a href=\"/toys-games-electronics-action-figures/b/ref=gno_cartgw_pop?ie=UTF8&node=165793011\">toys</a>, <a href=\"/consumer-electronics-tvs-cameras-phones/b/ref=gno_cartgw_pop?ie=UTF8&node=172282\">electronics</a>, and <a href=\"/gp/site-directory/ref=gno_cartgw_pop\">more</a>.<br><br><p>Not your cart? <a href=\"/gp/yourstore/ref=gno_cartgw_pop?ie=UTF8&signIn=1\">Sign In</a></td></tr><tr><td width=\"100%\" colspan=\"2\">&nbsp;</td></tr></table></td></tr></table></div></div>


This PCRE query is crashing in version 6.4 and 7.0 . i downloaded the latest version as well and compiled the sources and tested this pattern and subject in a javascript file. It crashed at the "match" function in pcre_exec.c file. Kindly answer my query and sort out my problem. if some other working version is available, kindly inform.