# coding=utf8
# the above tag defines encoding for this document and is for Python 2.x compatibility
import re
regex = r"<td>In Stock<\/td><td><input type=\"checkbox\" name=\"bookId\[]\" value=\"(.+)\""
test_str = ("HTTP/1.1 200 OK\n"
"Date: Fri, 11 Sep 2015 15:39:48 GMT\n"
"Server: Apache\n"
"X-Pingback: http://www.myloadtest.com/xmlrpc.php\n"
"Link: <http://www.myloadtest.com/?p=216>; rel=shortlink\n"
"Expires: Thu, 19 Nov 1981 08:52:00 GMT\n"
"Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0\n"
"Pragma: no-cache\n"
"Vary: Accept-Encoding,User-Agent\n"
"Content-Length: 8235\n"
"Content-Type: text/html; charset=UTF-8\n"
"Proxy-Connection: Keep-Alive\n"
"Connection: Keep-Alive\n"
"Content-Encoding: gzip\n\n\n"
"<!DOCTYPE html> \n"
"<html lang=\"en-US\"> \n"
"<head>\n"
"<meta charset=\"UTF-8\">\n"
"<meta name=\"viewport\" content=\"width=device-width\">\n\n"
"<title>Correlation Challenge – My Load Test</title>\n\n"
"<link rel=\"stylesheet\" href=\"http://www.myloadtest.com/wp-content/themes/myloadtest2012j/style.css\">\n"
"<link rel=\"stylesheet\" href=\"http://www.myloadtest.com/wp-content/themes/myloadtest2012j/styles/header-boxtop-body-bg.css\">\n"
"<link rel=\"pingback\" href=\"http://www.myloadtest.com/xmlrpc.php\">\n"
"<link href='http://fonts.googleapis.com/css?family=Oswald:400,300,700' rel='stylesheet' type='text/css'>\n"
"<!--[if lt IE 9]><script src=\"http://html5shiv.googlecode.com/svn/trunk/html5.js\"></script><![endif]-->\n"
"<link rel=\"alternate\" type=\"application/rss+xml\" title=\"My Load Test » Feed\" href=\"http://www.myloadtest.com/feed/\" />\n"
"<link rel=\"alternate\" type=\"application/rss+xml\" title=\"My Load Test » Comments Feed\" href=\"http://www.myloadtest.com/comments/feed/\" />\n"
"<link rel=\"alternate\" type=\"application/rss+xml\" title=\"My Load Test » Correlation Challenge Comments Feed\" href=\"http://www.myloadtest.com/training/correlation-challenge/feed/\" />\n"
" <script type=\"text/javascript\">\n"
" window._wpemojiSettings = {\"baseUrl\":\"http:\\/\\/s.w.org\\/images\\/core\\/emoji\\/72x72\\/\",\"ext\":\".png\",\"source\":{\"concatemoji\":\"http:\\/\\/www.myloadtest.com\\/wp-includes\\/js\\/wp-emoji-release.min.js?ver=4.3\"}};\n"
" !function(a,b,c){function d(a){var c=b.createElement(\"canvas\"),d=c.getContext&&c.getContext(\"2d\");return d&&d.fillText?(d.textBaseline=\"top\",d.font=\"600 32px Arial\",\"flag\"===a?(d.fillText(String.fromCharCode(55356,56812,55356,56807),0,0),c.toDataURL().length>3e3):(d.fillText(String.fromCharCode(55357,56835),0,0),0!==d.getImageData(16,16,1,1).data[0])):!1}function e(a){var c=b.createElement(\"script\");c.src=a,c.type=\"text/javascript\",b.getElementsByTagName(\"head\")[0].appendChild(c)}var f,g;c.supports={simple:d(\"simple\"),flag:d(\"flag\")},c.DOMReady=!1,c.readyCallback=function(){c.DOMReady=!0},c.supports.simple&&c.supports.flag||(g=function(){c.readyCallback()},b.addEventListener?(b.addEventListener(\"DOMContentLoaded\",g,!1),a.addEventListener(\"load\",g,!1)):(a.attachEvent(\"onload\",g),b.attachEvent(\"onreadystatechange\",function(){\"complete\"===b.readyState&&c.readyCallback()})),f=c.source||{},f.concatemoji?e(f.concatemoji):f.wpemoji&&f.twemoji&&(e(f.twemoji),e(f.wpemoji)))}(window,document,window._wpemojiSettings);\n"
" </script>\n"
" <style type=\"text/css\">\n"
"img.wp-smiley,\n"
"img.emoji {\n"
" display: inline !important;\n"
" border: none !important;\n"
" box-shadow: none !important;\n"
" height: 1em !important;\n"
" width: 1em !important;\n"
" margin: 0 .07em !important;\n"
" vertical-align: -0.1em !important;\n"
" background: none !important;\n"
" padding: 0 !important;\n"
"}\n"
"</style>\n"
"<link rel='stylesheet' id='yarppWidgetCss-css' href='http://www.myloadtest.com/wp-content/plugins/yet-another-related-posts-plugin/style/widget.css?ver=4.3' type='text/css' media='all' />\n"
"<link rel='stylesheet' id='contact-form-7-css' href='http://www.myloadtest.com/wp-content/plugins/contact-form-7/includes/css/styles.css?ver=4.2.1' type='text/css' media='all' />\n"
"<link rel='stylesheet' id='wp-syntax-css-css' href='http://www.myloadtest.com/wp-content/plugins/wp-syntax/css/wp-syntax.css?ver=1.0' type='text/css' media='all' />\n"
"<script type='text/javascript' src='http://www.myloadtest.com/wp-includes/js/jquery/jquery.js?ver=1.11.3'></script>\n"
"<script type='text/javascript' src='http://www.myloadtest.com/wp-includes/js/jquery/jquery-migrate.min.js?ver=1.2.1'></script>\n"
"<script type='text/javascript' src='http://www.myloadtest.com/wp-includes/js/jquery/ui/core.min.js?ver=1.11.4'></script>\n"
"<script type='text/javascript' src='http://www.myloadtest.com/wp-includes/js/jquery/ui/widget.min.js?ver=1.11.4'></script>\n"
"<script type='text/javascript' src='http://www.myloadtest.com/wp-includes/js/jquery/ui/tabs.min.js?ver=1.11.4'></script>\n"
"<script type='text/javascript' src='http://www.myloadtest.com/wp-content/themes/myloadtest2012j/js/sprout.combined.min.js?ver=1.0'></script>\n"
"<script type='text/javascript' src='http://www.myloadtest.com/wp-content/themes/myloadtest2012j/js/jquery.theme.js?ver=1.0'></script>\n"
"<script type='text/javascript' src='http://www.myloadtest.com/wp-content/plugins/google-analyticator/external-tracking.min.js?ver=6.4.9'></script>\n"
"<link rel=\"EditURI\" type=\"application/rsd+xml\" title=\"RSD\" href=\"http://www.myloadtest.com/xmlrpc.php?rsd\" />\n"
"<link rel=\"wlwmanifest\" type=\"application/wlwmanifest+xml\" href=\"http://www.myloadtest.com/wp-includes/wlwmanifest.xml\" /> \n"
"<link rel='canonical' href='http://www.myloadtest.com/training/correlation-challenge/' />\n"
"<link rel='shortlink' href='http://www.myloadtest.com/?p=216' />\n\n"
"<script>\n"
"var _prum = [['id', '5191e0f6abe53d5549000000'],\n"
" ['mark', 'firstbyte', (new Date()).getTime()]];\n"
"(function() {\n"
" var s = document.getElementsByTagName('script')[0]\n"
" , p = document.createElement('script');\n"
" p.async = 'async';\n"
" p.src = '//rum-static.pingdom.net/prum.min.js';\n"
" s.parentNode.insertBefore(p, s);\n"
"})();\n"
"</script>\n\n"
" <style type=\"text/css\">.recentcomments a{display:inline !important;padding:0 !important;margin:0 !important;}</style>\n"
"<style type=\"text/css\">.broken_link, a.broken_link {\n"
" text-decoration: line-through;\n"
"}</style><!-- Google Analytics Tracking by Google Analyticator 6.4.9: http://www.videousermanuals.com/google-analyticator/ -->\n"
"<script type=\"text/javascript\">\n"
" var analyticsFileTypes = [''];\n"
" var analyticsSnippet = 'enabled';\n"
" var analyticsEventTracking = 'enabled';\n"
"</script>\n"
"<script type=\"text/javascript\">\n"
" var _gaq = _gaq || [];\n"
" \n"
" _gaq.push(['_setAccount', 'UA-3179857-2']);\n"
" _gaq.push(['_addDevId', 'i9k95']); // Google Analyticator App ID with Google\n"
" _gaq.push(['_trackPageview']);\n\n"
" (function() {\n"
" var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;\n"
" ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';\n"
" var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);\n"
" })();\n"
"</script>\n"
"</head>\n\n"
"<body class=\"page page-id-216 page-child parent-pageid-294 page-template page-template-__correlation-challenge page-template-__correlation-challenge-php ie8\">\n"
"<header id=\"header\">\n"
" <div id=\"header-inner\" class=\"container-12\"> \n"
" <p id=\"logo\" class=\"logo-img\"><a href=\"http://www.myloadtest.com/\" rel=\"home\"><img src=\"http://www.myloadtest.com/wp-content/themes/myloadtest2012j/images/myloadtest.png\" alt=\"My Load Test\"></a></p>\n"
" \n"
" <nav id=\"nav-header\" class=\"menu-header-menu-container\"><ul id=\"nav\" class=\"menu\"><li id=\"menu-item-244\" class=\"menu-item menu-item-type-taxonomy menu-item-object-category menu-item-244\"><a href=\"http://www.myloadtest.com/loadrunner/\">LoadRunner</a></li>\n"
"<li id=\"menu-item-245\" class=\"menu-item menu-item-type-taxonomy menu-item-object-category menu-item-245\"><a href=\"http://www.myloadtest.com/blog/\">Blog</a></li>\n"
"<li id=\"menu-item-3340\" class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children menu-item-3340\"><a title=\"Performance Testing Services\" href=\"http://www.myloadtest.com/services/\">Services</a>\n"
"<ul class=\"sub-menu\">\n"
" <li id=\"menu-item-3341\" class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-3341\"><a href=\"http://www.myloadtest.com/services/governance/\">Performance Test Governance</a></li>\n"
" <li id=\"menu-item-3434\" class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-3434\"><a href=\"http://www.myloadtest.com/services/continuous-integration/\">Continuous Integration</a></li>\n"
" <li id=\"menu-item-3125\" class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-3125\"><a href=\"http://www.myloadtest.com/services/script-development/\">Script Development</a></li>\n"
"</ul>\n"
"</li>\n"
"<li id=\"menu-item-246\" class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children menu-item-246\"><a href=\"http://www.myloadtest.com/tools/\">Tools</a>\n"
"<ul class=\"sub-menu\">\n"
" <li id=\"menu-item-309\" class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-309\"><a href=\"http://www.myloadtest.com/tools/vugen-addin-manager/\">VuGen Add-in Manager</a></li>\n"
" <li id=\"menu-item-291\" class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-291\"><a href=\"http://www.myloadtest.com/tools/validator/\">VuGen Validator Add-in</a></li>\n"
" <li id=\"menu-item-361\" class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-361\"><a href=\"http://www.myloadtest.com/tools/loadrunner-function-library/\">LoadRunner Function Library</a></li>\n"
" <li id=\"menu-item-259\" class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-259\"><a href=\"http://www.myloadtest.com/loadrunner-syntax-highlighter/\">LoadRunner Syntax Highlighting</a></li>\n"
" <li id=\"menu-item-3189\" class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-3189\"><a href=\"http://www.myloadtest.com/tools/vugen-local-replay/\">VuGen Local Replay</a></li>\n"
" <li id=\"menu-item-3275\" class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-3275\"><a href=\"http://www.myloadtest.com/tools/urldecoder/\">URLEncode/URLDecode</a></li>\n"
"</ul>\n"
"</li>\n"
"<li id=\"menu-item-295\" class=\"menu-item menu-item-type-post_type menu-item-object-page current-page-ancestor current-menu-ancestor current-menu-parent current-page-parent current_page_parent current_page_ancestor menu-item-has-children menu-item-295\"><a href=\"http://www.myloadtest.com/training/\">Training</a>\n"
"<ul class=\"sub-menu\">\n"
" <li id=\"menu-item-355\" class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-355\"><a href=\"http://www.myloadtest.com/training/vugen-scripting-for-web/\">VuGen Scripting for Web</a></li>\n"
" <li id=\"menu-item-248\" class=\"menu-item menu-item-type-post_type menu-item-object-page current-menu-item page_item page-item-216 current_page_item menu-item-248\"><a href=\"http://www.myloadtest.com/training/correlation-challenge/\">Correlation Challenge</a></li>\n"
" <li id=\"menu-item-2806\" class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-2806\"><a href=\"http://www.myloadtest.com/training/credit-card-challenge/\">Credit Card Challenge</a></li>\n"
"</ul>\n"
"</li>\n"
"<li id=\"menu-item-247\" class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-247\"><a href=\"http://www.myloadtest.com/about/\">About</a></li>\n"
"</ul></nav> </div><!--/header-inner-->\n"
"</header><!--/header-->\n"
"<div id=\"headstyle-nav\">\n"
" </div><!--/headstyle-nav-->\n"
"<div id=\"headstyle\">\n"
" <div id=\"headstyle-bg\">\n"
" </div>\n"
" <div id=\"headstyle-arc\"></div>\n"
"</div><!--/headstyle-->\n\n"
"<div id=\"wrapper\">\n\n"
"<div id=\"subheader\">\n"
" <div id=\"subheader-top\"></div>\n"
" <div id=\"subheader-inner\" class=\"container-12 clearfix\">\n"
" <h2 class=\"ctitle\"><span>MyLoadTest</span></h2> \n"
" <div class=\"clear\"></div>\n"
" </div><!--/subheader-inner-->\n"
"</div><!--/subheader-->\n"
"<div id=\"content\">\n"
" <div id=\"content-inner\" class=\"container-12 sidebar t-page clearfix\">\n\n"
" <div class=\"grid entry-list\">\n"
" <article id=\"entry-216\" class=\"entry post-216 page type-page status-publish hentry\">\n"
" <div class=\"entry-inner\">\n"
" <header>\n"
" <h2 class=\"entry-title\">Correlation Challenge</h2>\n"
" </header>\n"
" <div class=\"text clearfix\">\n\n\n"
" <h3>Step 3</h3>\n"
" <p>Select all the books that are <em>in stock</em>, and press next.</p>\n\n"
" <p>\n"
" <form action=\"http://www.myloadtest.com/training/correlation-challenge/?step=4\" method=\"post\">\n"
" <input type=\"hidden\" name=\"sortoption\" value=\"PRICE_ASCENDING\" />\n"
" <input type=\"hidden\" name=\"next\" value=\"addToBasket\" />\n"
" <input type=\"hidden\" name=\"basket\" value=\"3761\" />\n"
" <table border=\"1\">\n"
" <tr>\n"
" <th>Title</th>\n"
" <th>Author</th>\n"
" <th>Availability</th>\n"
" <th>Select</th>\n"
" </tr>\n"
" <tr>\n"
" <td><a href=\"http://www.amazon.com/Fundamentals-Performance-Engineering-firefighter-without/dp/1934474010\">Fundamentals of Performance Engineering</a></td>\n"
" <td>Keith Smith, Bob Wescott</td>\n"
" <td>Out of Stock</td>\n"
" <td><input type=\"checkbox\" name=\"bookId[]\" value=\"3761804987b9709e8b09c4f134ef35cc973d\" /></td>\n"
" </tr>\n"
" <tr>\n"
" <td><a href=\"http://www.amazon.com/Software-Performance-Scalability-Quantitative-Engineering/dp/0470462531\">Software Performance and Scalability</a></td>\n"
" <td>Henry H. Liu</td>\n"
" <td>Out of Stock</td>\n"
" <td><input type=\"checkbox\" name=\"bookId[]\" value=\"37616b5b7fa112c1b395fc6e4eea63722b19\" /></td>\n"
" </tr>\n"
" <tr>\n"
" <td><a href=\"http://www.amazon.com/Web-Performance-Tuning-OReilly-Internet/dp/059600172X\">Web Performance Tuning</a></td>\n"
" <td>Patrick Killelea</td>\n"
" <td>Out of Stock</td>\n"
" <td><input type=\"checkbox\" name=\"bookId[]\" value=\"37612f4d1c1a342a51bef1326de9c88d226a\" /></td>\n"
" </tr>\n"
" <tr>\n"
" <td><a href=\"http://www.amazon.com/Art-Capacity-Planning-Scaling-Resources/dp/0596518579\">The Art of Capacity Planning</a></td>\n"
" <td>John Allspaw</td>\n"
" <td>Out of Stock</td>\n"
" <td><input type=\"checkbox\" name=\"bookId[]\" value=\"376194acde8a661f319e8348261421971310\" /></td>\n"
" </tr>\n"
" <tr>\n"
" <td><a href=\"http://www.amazon.com/NET-Performance-Testing-Optimization-Complete/dp/1906434409\">.NET Performance Testing and Optimization</a></td>\n"
" <td>Paul Glavich, Chris Farrell</td>\n"
" <td>Out of Stock</td>\n"
" <td><input type=\"checkbox\" name=\"bookId[]\" value=\"3761443df13bf05f1b2fa1664d06af01731d\" /></td>\n"
" </tr>\n"
" <tr>\n"
" <td><a href=\"http://www.amazon.com/Practical-Performance-Analyst-Neil-Gunther/dp/059512674X\">The Practical Performance Analyst</a></td>\n"
" <td>Neil Gunther</td>\n"
" <td>Out of Stock</td>\n"
" <td><input type=\"checkbox\" name=\"bookId[]\" value=\"376114e688ad0b2a746c8087e0ccf44a4c20\" /></td>\n"
" </tr>\n"
" <tr>\n"
" <td><a href=\"http://www.amazon.com/Integrated-Approach-Performance-Testing-Practitioners/dp/1591407850/\">Integrated Approach to Web Performance Testing</a></td>\n"
" <td>B. M. Subraya</td>\n"
" <td>Out of Stock</td>\n"
" <td><input type=\"checkbox\" name=\"bookId[]\" value=\"37614e962b42835918912b5eeb2db8b3217f\" /></td>\n"
" </tr>\n"
" <tr>\n"
" <td><a href=\"http://www.amazon.com/Performance-Testing-Guidance-Web-Applications/dp/0735625700\">Performance Testing Guidance for Web Applications</a></td>\n"
" <td>J.D. Meier, Carlos Farre, Prashant Bansode, Scott Barber, Dennis Rea</td>\n"
" <td>In Stock</td>\n"
" <td><input type=\"checkbox\" name=\"bookId[]\" value=\"37615fe6ff3dfb8b410774a9ac519da79f8c\" /></td>\n"
" </tr>\n"
" <tr>\n"
" <td><a href=\"http://www.amazon.com/Scalable-Internet-Architectures-Theo-Schlossnagle/dp/067232699X\">Scalable Internet Architectures</a></td>\n"
" <td>Theo Schlossnagle</td>\n"
" <td>In Stock</td>\n"
" <td><input type=\"checkbox\" name=\"bookId[]\" value=\"37614397eff1747c99aaa425f129a8bd7339\" /></td>\n"
" </tr>\n"
" <tr>\n"
" <td><a href=\"http://www.amazon.com/High-Performance-Web-Sites-Essential/dp/0596529309\">High Performance Web Sites</a></td>\n"
" <td>Steve Souders</td>\n"
" <td>Out of Stock</td>\n"
" <td><input type=\"checkbox\" name=\"bookId[]\" value=\"3761893d16f12c7ddc491755083a857c421e\" /></td>\n"
" </tr>\n"
" <tr>\n"
" <td><a href=\"http://www.amazon.com/Java-Performance-Tuning-Jack-Shirazi/dp/0596003773\">Java Performance Tuning</a></td>\n"
" <td>Jack Shirazi</td>\n"
" <td>Out of Stock</td>\n"
" <td><input type=\"checkbox\" name=\"bookId[]\" value=\"3761441417e472ec3823d64c901e1b91b86a\" /></td>\n"
" </tr>\n"
" <tr>\n"
" <td><a href=\"http://www.amazon.com/Art-Application-Performance-Testing-Programmers/dp/0596520662\">The Art of Application Performance Testing</a></td>\n"
" <td>Ian Molyneaux</td>\n"
" <td>In Stock</td>\n"
" <td><input type=\"checkbox\" name=\"bookId[]\" value=\"37616181430fb9078c586008a936f1e2f6d5\" /></td>\n"
" </tr>\n"
" <tr>\n"
" <td><a href=\"http://www.amazon.com/Performance-Analysis-Websites-Stacy-Joines/dp/0201844540\">Performance Analysis for Java Websites</a></td>\n"
" <td>Stacy Joines, Ruth Willenborg, Ken Hygh</td>\n"
" <td>In Stock</td>\n"
" <td><input type=\"checkbox\" name=\"bookId[]\" value=\"37615b65c8f37180ebefd2eb44d60e9f4bf3\" /></td>\n"
" </tr>\n"
" <tr>\n"
" <td><a href=\"http://www.amazon.com/Apache-JMeter-practical-performance-measurement/dp/1847192955\">Apache JMeter</a></td>\n"
" <td>Emily H. Halili</td>\n"
" <td>In Stock</td>\n"
" <td><input type=\"checkbox\" name=\"bookId[]\" value=\"3761b63f76b1b652b90bd22b6d3623cc11d9\" /></td>\n"
" </tr>\n"
" <tr>\n"
" <td><a href=\"http://www.amazon.com/Scalability-Rules-Principles-Scaling-Sites/dp/0321753887\">Scalability Rules</a></td>\n"
" <td>Martin L. Abbott, Michael T. Fisher</td>\n"
" <td>Out of Stock</td>\n"
" <td><input type=\"checkbox\" name=\"bookId[]\" value=\"376134099c0b5a9dc62f87f5690d9ddfa322\" /></td>\n"
" </tr>\n"
" <tr>\n"
" <td><a href=\"http://www.amazon.com/Building-Scalable-Web-Sites-Applications/dp/0596102356\">Building Scalable Web Sites</a></td>\n"
" <td>Cal Henderson</td>\n"
" <td>Out of Stock</td>\n"
" <td><input type=\"checkbox\" name=\"bookId[]\" value=\"3761d23a39c5964a9cb410c68c1328d0ef70\" /></td>\n"
" </tr>\n"
" <tr>\n"
" <td><a href=\"http://www.amazon.com/Art-Scalability-Architecture-Organizations-Enterprise/dp/0137030428\">The Art of Scalability</a></td>\n"
" <td>Martin L. Abbott, Michael T. Fisher</td>\n"
" <td>Out of Stock</td>\n"
" <td><input type=\"checkbox\" name=\"bookId[]\" value=\"3761c952f17f24a8260e1189d98d757b15fc\" /></td>\n"
" </tr>\n"
" </table>\n\n"
" <input type=\"submit\" value=\"Next\" />\n"
" </form>\n\n\n"
" <div class=\"clear\"></div>\n"
" </div>\n"
" </div><!--/entry-inner-->\n"
" <ul class=\"entry-meta clearfix\">\n"
" <li class=\"categories\"><i class=\"icon-16 categories\"></i></li>\n"
" </ul>\n"
" </article>\n"
" \n"
" </div><!--/grid-->\n\n"
" <div id=\"sidebar\" class=\"grid-4\">\n"
" <div id=\"sidebar-wide\" class=\"clearfix\">\n"
" <ul>\n"
" <li id=\"search-2\" class=\"widget widget_search\"><form role=\"search\" method=\"get\" id=\"searchform\" class=\"searchform\" action=\"http://www.myloadtest.com/\">\n"
" <div>\n"
" <label class=\"screen-reader-text\" for=\"s\">Search for:</label>\n"
" <input type=\"text\" value=\"\" name=\"s\" id=\"s\" />\n"
" <input type=\"submit\" id=\"searchsubmit\" value=\"Search\" />\n"
" </div>\n"
" </form></li><li id=\"text-5\" class=\"widget widget_text\"><h3 class=\"widget-title\"><span>About MyLoadTest</span></h3> <div class=\"textwidget\"><p>MyLoadTest is a boutique consultancy company, specialising in performance testing. We are dedicated to improving the quality of performance testing through education and better tools.</p></div>\n"
" </li><li id=\"text-7\" class=\"widget widget_text\"> <div class=\"textwidget\"><a href=\"http://www.myloadtest.com/mailing-list/\"><img src=\"http://www.myloadtest.com/resources/myloadtest-mailing-list.png\" alt=\"Performance Testing mailing list\" height=\"79\" width=\"210\" /></a></div>\n"
" </li><li id=\"text-8\" class=\"widget widget_text\"> <div class=\"textwidget\"><img src=\"http://www.myloadtest.com/wp-content/themes/myloadtest2012j/images/myloadtest-logo.png\" alt=\"MyLoadTest\" height=\"180\" width=\"240\" />\n"
"</div>\n"
" </li> </ul>\n"
" </div><!--/sidebar-wide-->\n"
"</div><!--/grid-->\n"
" </div><!--/content-inner-->\n"
"</div><!--/content-->\n\n"
" <div id=\"footernav\">\n"
" <div id=\"footernav-inner\" class=\"container-12\">\n"
" <div class=\"clear\"></div>\n"
" </div><!--/footernav-inner-->\n"
" </div><!--/footernav-->\n\n"
" \n"
" <div id=\"subfooter\">\n"
" <div id=\"subfooter-inner\" class=\"container-12\">\n"
" <h3 class=\"ctitle\"><span>More on My Load Test</span></h3>\n"
" <ul class=\"grid-3\">\n"
" <li id=\"recent-posts-2\" class=\"widget widget_recent_entries\"> <h4 class=\"widget-title\"><span>Recent Posts</span></h4> <ul>\n"
" <li>\n"
" <a href=\"http://www.myloadtest.com/new-relic-vs-appdynamics/\">New Relic vs. AppDynamics</a>\n"
" </li>\n"
" <li>\n"
" <a href=\"http://www.myloadtest.com/static-analysis-for-loadrunner/\">Static code analysis for LoadRunner scripts</a>\n"
" </li>\n"
" <li>\n"
" <a href=\"http://www.myloadtest.com/performance-testing-in-the-cloud/\">Performance Testing in the Cloud</a>\n"
" </li>\n"
" <li>\n"
" <a href=\"http://www.myloadtest.com/iqnite-australia-2014/\">Iqnite Australia 2014</a>\n"
" </li>\n"
" <li>\n"
" <a href=\"http://www.myloadtest.com/performance-testing-memes/\">Performance Testing memes</a>\n"
" </li>\n"
" </ul>\n"
" </li> </ul>\n"
" <ul class=\"grid-3\">\n"
" <li id=\"recent-comments-2\" class=\"widget widget_recent_comments\"><h4 class=\"widget-title\"><span>Recent Comments</span></h4><ul id=\"recentcomments\"><li class=\"recentcomments\"><span class=\"comment-author-link\">Richard</span> on <a href=\"http://www.myloadtest.com/vugen-runtime-settings/#comment-358452\">LoadRunner Script Runtime Settings</a></li><li class=\"recentcomments\"><span class=\"comment-author-link\">Stuart Moncrieff</span> on <a href=\"http://www.myloadtest.com/vugen-runtime-settings/#comment-357080\">LoadRunner Script Runtime Settings</a></li><li class=\"recentcomments\"><span class=\"comment-author-link\">Natalie</span> on <a href=\"http://www.myloadtest.com/new-relic-vs-appdynamics/#comment-357055\">New Relic vs. AppDynamics</a></li><li class=\"recentcomments\"><span class=\"comment-author-link\">Richard</span> on <a href=\"http://www.myloadtest.com/vugen-runtime-settings/#comment-356953\">LoadRunner Script Runtime Settings</a></li><li class=\"recentcomments\"><span class=\"comment-author-link\">Stuart Moncrieff</span> on <a href=\"http://www.myloadtest.com/loadrunner-vs-performance-center/#comment-356913\">LoadRunner vs. Performance Center</a></li></ul></li> </ul>\n"
" <ul class=\"grid-6\">\n"
" <li id=\"tag_cloud-2\" class=\"widget widget_tag_cloud\"><h4 class=\"widget-title\"><span>Tags</span></h4><div class=\"tagcloud\"><a href='http://www.myloadtest.com/tag/add-ins/' class='tag-link-83' title='4 topics' style='font-size: 13.045045045045pt;'>add-ins</a>\n"
"<a href='http://www.myloadtest.com/tag/ajax/' class='tag-link-66' title='1 topic' style='font-size: 8pt;'>Ajax</a>\n"
"<a href='http://www.myloadtest.com/tag/awk/' class='tag-link-63' title='1 topic' style='font-size: 8pt;'>awk</a>\n"
"<a href='http://www.myloadtest.com/tag/bpm/' class='tag-link-25' title='2 topics' style='font-size: 10.27027027027pt;'>BPM</a>\n"
"<a href='http://www.myloadtest.com/tag/c/' class='tag-link-80' title='1 topic' style='font-size: 8pt;'>C</a>\n"
"<a href='http://www.myloadtest.com/tag/captcha/' class='tag-link-68' title='1 topic' style='font-size: 8pt;'>CAPTCHA</a>\n"
"<a href='http://www.myloadtest.com/tag/certification/' class='tag-link-74' title='4 topics' style='font-size: 13.045045045045pt;'>certification</a>\n"
"<a href='http://www.myloadtest.com/tag/citrix-ica/' class='tag-link-71' title='1 topic' style='font-size: 8pt;'>Citrix ICA</a>\n"
"<a href='http://www.myloadtest.com/tag/conference/' class='tag-link-55' title='12 topics' style='font-size: 18.216216216216pt;'>conference</a>\n"
"<a href='http://www.myloadtest.com/tag/consulting-2/' class='tag-link-69' title='3 topics' style='font-size: 11.783783783784pt;'>consulting</a>\n"
"<a href='http://www.myloadtest.com/tag/hp-diagnostics/' class='tag-link-56' title='1 topic' style='font-size: 8pt;'>HP Diagnostics</a>\n"
"<a href='http://www.myloadtest.com/tag/iis/' class='tag-link-64' title='1 topic' style='font-size: 8pt;'>IIS</a>\n"
"<a href='http://www.myloadtest.com/tag/java/' class='tag-link-44' title='2 topics' style='font-size: 10.27027027027pt;'>Java</a>\n"
"<a href='http://www.myloadtest.com/tag/java-record-replay/' class='tag-link-54' title='3 topics' style='font-size: 11.783783783784pt;'>Java Record Replay</a>\n"
"<a href='http://www.myloadtest.com/tag/jdbc/' class='tag-link-30' title='1 topic' style='font-size: 8pt;'>JDBC</a>\n"
"<a href='http://www.myloadtest.com/tag/loadrunner/' class='tag-link-141' title='25 topics' style='font-size: 22pt;'>LoadRunner</a>\n"
"<a href='http://www.myloadtest.com/tag/logparser/' class='tag-link-11' title='2 topics' style='font-size: 10.27027027027pt;'>LogParser</a>\n"
"<a href='http://www.myloadtest.com/tag/monitoring/' class='tag-link-12' title='2 topics' style='font-size: 10.27027027027pt;'>monitoring</a>\n"
"<a href='http://www.myloadtest.com/tag/mq/' class='tag-link-114' title='1 topic' style='font-size: 8pt;'>MQ</a>\n"
"<a href='http://www.myloadtest.com/tag/myloadtest/' class='tag-link-53' title='5 topics' style='font-size: 14.054054054054pt;'>MyLoadTest</a>\n"
"<a href='http://www.myloadtest.com/tag/performance-testing/' class='tag-link-40' title='9 topics' style='font-size: 16.828828828829pt;'>Performance Testing</a>\n"
"<a href='http://www.myloadtest.com/tag/performance-tuning/' class='tag-link-78' title='1 topic' style='font-size: 8pt;'>performance tuning</a>\n"
"<a href='http://www.myloadtest.com/tag/quicktest-pro/' class='tag-link-14' title='1 topic' style='font-size: 8pt;'>QuickTest Pro</a>\n"
"<a href='http://www.myloadtest.com/tag/rational-performance-tester/' class='tag-link-79' title='1 topic' style='font-size: 8pt;'>Rational Performance Tester</a>\n"
"<a href='http://www.myloadtest.com/tag/rdp/' class='tag-link-72' title='1 topic' style='font-size: 8pt;'>RDP</a>\n"
"<a href='http://www.myloadtest.com/tag/sap/' class='tag-link-26' title='4 topics' style='font-size: 13.045045045045pt;'>SAP</a>\n"
"<a href='http://www.myloadtest.com/tag/sapgui/' class='tag-link-15' title='2 topics' style='font-size: 10.27027027027pt;'>SAPGUI</a>\n"
"<a href='http://www.myloadtest.com/tag/security/' class='tag-link-59' title='13 topics' style='font-size: 18.720720720721pt;'>security</a>\n"
"<a href='http://www.myloadtest.com/tag/shunra/' class='tag-link-61' title='1 topic' style='font-size: 8pt;'>Shunra</a>\n"
"<a href='http://www.myloadtest.com/tag/soap/' class='tag-link-29' title='1 topic' style='font-size: 8pt;'>SOAP</a>\n"
"<a href='http://www.myloadtest.com/tag/sql/' class='tag-link-60' title='1 topic' style='font-size: 8pt;'>SQL</a>\n"
"<a href='http://www.myloadtest.com/tag/testing/' class='tag-link-76' title='5 topics' style='font-size: 14.054054054054pt;'>testing</a>\n"
"<a href='http://www.myloadtest.com/tag/training-2/' class='tag-link-73' title='6 topics' style='font-size: 14.936936936937pt;'>training</a>\n"
"<a href='http://www.myloadtest.com/tag/tsl/' class='tag-link-52' title='2 topics' style='font-size: 10.27027027027pt;'>TSL</a>\n"
"<a href='http://www.myloadtest.com/tag/unix/' class='tag-link-57' title='1 topic' style='font-size: 8pt;'>Unix</a>\n"
"<a href='http://www.myloadtest.com/tag/validator/' class='tag-link-132' title='2 topics' style='font-size: 10.27027027027pt;'>Validator</a>\n"
"<a href='http://www.myloadtest.com/tag/vmware/' class='tag-link-75' title='1 topic' style='font-size: 8pt;'>VMware</a>\n"
"<a href='http://www.myloadtest.com/tag/vugen/' class='tag-link-23' title='17 topics' style='font-size: 20.108108108108pt;'>VuGen</a>\n"
"<a href='http://www.myloadtest.com/tag/web-click-and-script/' class='tag-link-65' title='1 topic' style='font-size: 8pt;'>Web (Click and Script)</a>\n"
"<a href='http://www.myloadtest.com/tag/web-httphtml/' class='tag-link-67' title='3 topics' style='font-size: 11.783783783784pt;'>Web (HTTP/HTML)</a>\n"
"<a href='http://www.myloadtest.com/tag/webinspect/' class='tag-link-90' title='5 topics' style='font-size: 14.054054054054pt;'>WebInspect</a>\n"
"<a href='http://www.myloadtest.com/tag/webscarab/' class='tag-link-58' title='1 topic' style='font-size: 8pt;'>WebScarab</a>\n"
"<a href='http://www.myloadtest.com/tag/windows-sockets/' class='tag-link-70' title='1 topic' style='font-size: 8pt;'>Windows Sockets</a>\n"
"<a href='http://www.myloadtest.com/tag/winrunner/' class='tag-link-8' title='2 topics' style='font-size: 10.27027027027pt;'>WinRunner</a>\n"
"<a href='http://www.myloadtest.com/tag/wireshark/' class='tag-link-62' title='1 topic' style='font-size: 8pt;'>WireShark</a></div>\n"
"</li> </ul><!--\n"
" <ul class=\"grid-3\">\n"
" </ul>-->\n"
" <div class=\"clear\"></div>\n"
" </div><!--/subfooter-inner-->\n"
" </div><!--/subfooter-->\n"
" \n"
" <div id=\"footer\">\n"
" <div id=\"footer-inner\" class=\"container-12\">\n"
" <p id=\"copy\">Copyright © 2015 <a href=\"http://www.myloadtest.com/about/\">Stuart Moncrieff</a>.</p>\n"
" <div class=\"clear\"></div>\n"
" </div><!--/footer-inner-->\n"
" </div><!--/footer-->\n"
"</div><!--/wrapper-->\n\n"
" <!--QUIZ_EMBEDER START-->\n"
" <!--QUIZ_EMBEDER START-->\n"
" <link rel=\"stylesheet\" href=\"http://www.myloadtest.com/wp-content/plugins/insert-or-embed-articulate-content-into-wordpress/colorbox/themes/default/colorbox.css\" />\n"
" <script type=\"text/javascript\" src=\"http://www.myloadtest.com/wp-content/plugins/insert-or-embed-articulate-content-into-wordpress/colorbox/jquery.colorbox-min.js\" ></script>\n\n"
" <script type=\"text/javascript\">\n"
" jQuery(document).ready(function($){\n"
" //Examples of how to assign the ColorBox event to elements\n"
" $(\".colorbox_iframe\").colorbox({iframe:true, transition:\"elastic\", width:\"80%\", height:\"80%\", scrolling:true});\n"
" \n"
" \n"
" });\n"
" </script> \n"
" <!--QUIZ_EMBEDER END-->\n"
"<script type='text/javascript' src='http://www.myloadtest.com/wp-includes/js/comment-reply.min.js?ver=4.3'></script>\n"
"<script type='text/javascript' src='http://www.myloadtest.com/wp-content/plugins/contact-form-7/includes/js/jquery.form.min.js?ver=3.51.0-2014.06.20'></script>\n"
"<script type='text/javascript'>\n"
"/* <![CDATA[ */\n"
"var _wpcf7 = {\"loaderUrl\":\"http:\\/\\/www.myloadtest.com\\/wp-content\\/plugins\\/contact-form-7\\/images\\/ajax-loader.gif\",\"sending\":\"Sending ...\",\"cached\":\"1\"};\n"
"/* ]]> */\n"
"</script>\n"
"<script type='text/javascript' src='http://www.myloadtest.com/wp-content/plugins/contact-form-7/includes/js/scripts.js?ver=4.2.1'></script>\n"
"</body>\n"
"</html>\n"
"<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/\n\n"
" Served from: www.myloadtest.com @ 2015-09-12 01:39:49 by W3 Total Cache -->")
matches = re.search(regex, test_str)
if matches:
print ("Match was found at {start}-{end}: {match}".format(start = matches.start(), end = matches.end(), match = matches.group()))
for groupNum in range(0, len(matches.groups())):
groupNum = groupNum + 1
print ("Group {groupNum} found at {start}-{end}: {group}".format(groupNum = groupNum, start = matches.start(groupNum), end = matches.end(groupNum), group = matches.group(groupNum)))
# Note: for Python 2.7 compatibility, use ur"" to prefix the regex and u"" to prefix the test string and substitution.
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Python, please visit: https://docs.python.org/3/library/re.html