2015-02-24 89 views
-1

我需要一个正则表达式来提取如下:正则表达式匹配新行

<fieldset><input type="hidden" name="costMin" value="32" /><input type="hidden" name="costMax" value="340" /><input class="slider" id="priceSlider" type="text" name="price" value="32;340" /></fieldset></form> </div></div><div class="block_search_filter multiSelect" id="filter_1_ShoeSize" title="Shoe Size"> <div class="cf"> 
<span class="filter_label">Shoe Size</span><a href="http://tm.stage.arcadiagroup.ltd.uk/webapp/wcs/stores/servlet/CatalogNavigationSearchResultCmd?pageSize=20&amp;catalogId=33056&amp;viewAllFlag=false&amp;langId=-1&amp;sort_field=Relevance&amp;beginIndex=1&amp;categoryId=207294&amp;storeId=12555&amp;parent_categoryId=207282&amp;refinements=category~[1592051|207294]" class="link_clear_filter" title="Clear">Clear</a></div><div class="cf"> <ul> <li class="active" id="f_640" title="6/40" ><a href="http://tm.stage.arcadiagroup.ltd.uk/en/tmuk/category/shoes-and-accessories-1928527/smart-shoes-140525/brogues-2681502?noOfRefinements=1" rel="nofollow" title="">6/40<span class="item_count">(21)</span></a></li> <li class="" id="f_741" title="7/41" ><a href="http://tm.stage.arcadiagroup.ltd.uk/en/tmuk/category/shoes-and-accessories-1928527/smart-shoes-140525/brogues-2681502?refinements=Shoe%20Size{1}~[6%2F40|7%2F41]&amp;noOfRefinements=3" rel="nofollow" title="">7/41<span class="item_count">(22)</span></a></li> <li class="" id="f_842" title="8/42" ><a href="http://tm.stage.arcadiagroup.ltd.uk/en/tmuk/category/shoes-and-accessories-1928527/smart-shoes-140525/brogues-2681502?refinements=Shoe%20Size{1}~[6%2F40|8%2F42]&amp;noOfRefinements=3" rel="nofollow" title="">8/42<span class="item_count">(23)</span></a></li> <li class="" id="f_943" title="9/43" ><a href="http://tm.stage.arcadiagroup.ltd.uk/en/tmuk/category/shoes-and-accessories-1928527/smart-shoes-140525/brogues-2681502?refinements=Shoe%20Size{1}~[6%2F40|9%2F43]&amp;noOfRefinements=3" rel="nofollow" title="">9/43<span class="item_count">(23)</span></a></li> <li class="" id="f_1044" title="10/44" ><a href="http://tm.stage.arcadiagroup.ltd.uk/en/tmuk/category/shoes-and-accessories-1928527/smart-shoes-140525/brogues-2681502?refinements=Shoe%20Size{1}~[10%2F44|6%2F40]&amp;noOfRefinements=3" rel="nofollow" title="">10/44<span class="item_count">(23)</span></a></li> <li class="" id="f_1145" title="11/45" ><a href="http://tm.stage.arcadiagroup.ltd.uk/en/tmuk/category/shoes-and-accessories-1928527/smart-shoes-140525/brogues-2681502?refinements=Shoe%20Size{1}~[11%2F45|6%2F40]&amp;noOfRefinements=3" rel="nofollow" title="">11/45<span class="item_count">(22)</span></a></li> <li class="" id="f_1246" title="12/46" ><a href="http://tm.stage.arcadiagroup.ltd.uk/en/tmuk/category/shoes-and-accessories-1928527/smart-shoes-140525/brogues-2681502?refinements=Shoe%20Size{1}~[12%2F46|6%2F40]&amp;noOfRefinements=3" rel="nofollow" title="">12/46<span class="item_count">(20)</span></a></li> </ul> </div></div><div class="block_search_filter multiSelect" id="filter_1_Colour" title="Colour"> <div class="cf"> 
<span class="filter_label">Colour</span><a href="http://tm.stage.arcadiagroup.ltd.uk/webapp/wcs/stores/servlet/CatalogNavigationSearchResultCmd?pageSize=20&amp;catalogId=33056&amp;viewAllFlag=false&amp;langId=-1&amp;sort_field=Relevance&amp;beginIndex=1&amp;categoryId=207294&amp;storeId=12555&amp;parent_categoryId=207282&amp;refinements=Shoe%20Size{1}~[6%2F40]^category~[1592051|207294]" class="link_clear_filter" title="Clear">Clear</a></div><div class="cf"> <ul> <li class="" id="f_black" title="black" ><a href="http://tm.stage.arcadiagroup.ltd.uk/en/tmuk/category/shoes-and-accessories-1928527/smart-shoes-140525/brogues-2681502?refinements=Colour{1}~[black]^Shoe%20Size{1}~[6%2F40]&amp;noOfRefinements=3" rel="nofollow" title="">black<span class="item_count">(9)</span></a></li> <li class="" id="f_blue" title="blue" ><a href="http://tm.stage.arcadiagroup.ltd.uk/en/tmuk/category/shoes-and-accessories-1928527/smart-shoes-140525/brogues-2681502?refinements=Colour{1}~[blue]^Shoe%20Size{1}~[6%2F40]&amp;noOfRefinements=3" rel="nofollow" title="">blue<span class="item_count">(2)</span></a></li> <li class="" id="f_brown" title="brown" ><a href="http://tm.stage.arcadiagroup.ltd.uk/en/tmuk/category/shoes-and-accessories-1928527/smart-shoes-140525/brogues-2681502?refinements=Colour{1}~[brown]^Shoe%20Size{1}~[6%2F40]&amp;noOfRefinements=3" rel="nofollow" title="">brown<span class="item_count">(10)</span></a></li> </ul> </div></div> </div><a href="http://tm.stage.arcadiagroup.ltd.uk/webapp/wcs/stores/servlet/CatalogNavigationSearchResultCmd?pageSize=20&amp;catalogId=33056&amp;viewAllFlag=false&amp;langId=-1&amp;sort_field=Relevance&amp;beginIndex=1&amp;categoryId=207294&amp;storeId=12555&amp;parent_categoryId=207282" class="clear_all" title="Clear All">Clear All</a><div id="espot_aside_1" class="espot"> 

<form action="CatalogNavigationSearchResultCmd?"> 
<fieldset><input type="hidden" name="costMin" value="32" /><input type="hidden" name="costMax" value="340" /><input class="slider" id="priceSlider" type="text" name="price" value="32;340" /></fieldset></form> </div></div><div class="block_search_filter multiSelect" id="filter_1_ShoeSize" title="Shoe Size"> <div class="cf"> 
<span class="filter_label">Shoe Size</span><a href="http://tm.stage.arcadiagroup.ltd.uk/webapp/wcs/stores/servlet/CatalogNavigationSearchResultCmd?pageSize=20&amp;catalogId=33056&amp;viewAllFlag=false&amp;langId=-1&amp;sort_field=Relevance&amp;beginIndex=1&amp;categoryId=207294&amp;storeId=12555&amp;parent_categoryId=207282&amp;refinements=category~[1592051|207294]" class="link_clear_filter" title="Clear">Clear</a></div><div class="cf"> <ul> <li class="active" id="f_640" title="6/40" ><a href="http://tm.stage.arcadiagroup.ltd.uk/en/tmuk/category/shoes-and-accessories-1928527/smart-shoes-140525/brogues-2681502?noOfRefinements=1" rel="nofollow" title="">6/40<span class="item_count">(21)</span></a></li> <li class="" id="f_741" title="7/41" ><a href="http://tm.stage.arcadiagroup.ltd.uk/en/tmuk/category/shoes-and-accessories-1928527/smart-shoes-140525/brogues-2681502?refinements=Shoe%20Size{1}~[6%2F40|7%2F41]&amp;noOfRefinements=3" rel="nofollow" title="">7/41<span class="item_count">(22)</span></a></li> <li class="" id="f_842" title="8/42" ><a href="http://tm.stage.arcadiagroup.ltd.uk/en/tmuk/category/shoes-and-accessories-1928527/smart-shoes-140525/brogues-2681502?refinements=Shoe%20Size{1}~[6%2F40|8%2F42]&amp;noOfRefinements=3" rel="nofollow" title="">8/42<span class="item_count">(23)</span></a></li> <li class="" id="f_943" title="9/43" ><a href="http://tm.stage.arcadiagroup.ltd.uk/en/tmuk/category/shoes-and-accessories-1928527/smart-shoes-140525/brogues-2681502?refinements=Shoe%20Size{1}~[6%2F40|9%2F43]&amp;noOfRefinements=3" rel="nofollow" title="">9/43<span class="item_count">(23)</span></a></li> <li class="" id="f_1044" title="10/44" ><a href="http://tm.stage.arcadiagroup.ltd.uk/en/tmuk/category/shoes-and-accessories-1928527/smart-shoes-140525/brogues-2681502?refinements=Shoe%20Size{1}~[10%2F44|6%2F40]&amp;noOfRefinements=3" rel="nofollow" title="">10/44<span class="item_count">(23)</span></a></li> <li class="" id="f_1145" title="11/45" ><a href="http://tm.stage.arcadiagroup.ltd.uk/en/tmuk/category/shoes-and-accessories-1928527/smart-shoes-140525/brogues-2681502?refinements=Shoe%20Size{1}~[11%2F45|6%2F40]&amp;noOfRefinements=3" rel="nofollow" title="">11/45<span class="item_count">(22)</span></a></li> <li class="" id="f_1246" title="12/46" ><a href="http://tm.stage.arcadiagroup.ltd.uk/en/tmuk/category/shoes-and-accessories-1928527/smart-shoes-140525/brogues-2681502?refinements=Shoe%20Size{1}~[12%2F46|6%2F40]&amp;noOfRefinements=3" rel="nofollow" title="">12/46<span class="item_count">(20)</span></a></li> </ul> </div></div><div class="block_search_filter multiSelect" id="filter_1_Colour" title="Colour"> <div class="cf"> 
<span class="filter_label">Colour</span><a href="http://tm.stage.arcadiagroup.ltd.uk/webapp/wcs/stores/servlet/CatalogNavigationSearchResultCmd?pageSize=20&amp;catalogId=33056&amp;viewAllFlag=false&amp;langId=-1&amp;sort_field=Relevance&amp;beginIndex=1&amp;categoryId=207294&amp;storeId=12555&amp;parent_categoryId=207282&amp;refinements=Shoe%20Size{1}~[6%2F40]^category~[1592051|207294]" class="link_clear_filter" title="Clear">Clear</a></div><div class="cf"> <ul> <li class="" id="f_black" title="black" ><a href="http://tm.stage.arcadiagroup.ltd.uk/en/tmuk/category/shoes-and-accessories-1928527/smart-shoes-140525/brogues-2681502?refinements=Colour{1}~[black]^Shoe%20Size{1}~[6%2F40]&amp;noOfRefinements=3" rel="nofollow" title="">black<span class="item_count">(9)</span></a></li> <li class="" id="f_blue" title="blue" ><a href="http://tm.stage.arcadiagroup.ltd.uk/en/tmuk/category/shoes-and-accessories-1928527/smart-shoes-140525/brogues-2681502?refinements=Colour{1}~[blue]^Shoe%20Size{1}~[6%2F40]&amp;noOfRefinements=3" rel="nofollow" title="">blue<span class="item_count">(2)</span></a></li> <li class="" id="f_brown" title="brown" ><a href="http://tm.stage.arcadiagroup.ltd.uk/en/tmuk/category/shoes-and-accessories-1928527/smart-shoes-140525/brogues-2681502?refinements=Colour{1}~[brown]^Shoe%20Size{1}~[6%2F40]&amp;noOfRefinements=3" rel="nofollow" title="">brown<span class="item_count">(10)</span></a></li> </ul> </div></div> </div><a href="http://tm.stage.arcadiagroup.ltd.uk/webapp/wcs/stores/servlet/CatalogNavigationSearchResultCmd?pageSize=20&amp;catalogId=33056&amp;viewAllFlag=false&amp;langId=-1&amp;sort_field=Relevance&amp;beginIndex=1&amp;categoryId=207294&amp;storeId=12555&amp;parent_categoryId=207282" class="clear_all" title="Clear All">Clear All</a><div id="espot_aside_1" class="espot"> 
<script type="text/javascript"> 

如果我使用

<form action="CatalogNavigationSearchResultCmd?">(.*?)<script type="text/javascript"> 

没有返回值。

在此先感谢。

+0

请区分什么是输入和预期输出。 – Saif 2015-02-24 09:07:26

+0

你正在使用哪种正则表达式? – SabaRish 2015-02-24 09:08:19

+0

正在使用Neoload,它以正则表达式作为输入,从响应中提取我们需要的值。 – PFR 2015-02-24 09:13:32

回答

0

尝试使用单行或dotall选项。很多表达式可以像这样内联指定此选项:

(?s)(.*?) 
+0

谢谢...这工作:) – PFR 2015-02-24 09:15:26