egorea1999, ты сначала определись с какими строками ты все же работаешь... А потом можно будет подумать о регулярном выражении. :)
|
Цитата:
|
помогите, пожалуйста.
|
</td> <td class="productTitleGroup"> <div class="ellipsisOuterWrapper"> <div class="ellipsisInnerWrapper"> <section class="productTitleSection">DC Universe™ Online Free to Play</section> <label class="smallLabel productPublisherSection">SONY ONLINE ENTERTAINMENT LLC</label> </div> </div> </td> <td class="productTypeSection"> Game </td> <td class="productPurchasedSection"> <label class="purchaseDate">10/11/2013</label> </td> <td class="productExpiresSection"> <label class="expirationDate">--</label> </td> </tr> <tr> <td class="productImageSection"> <input id="mediaItemId_4" class="mediaItemId" type="hidden" value="EP0017-NPEA00266_00" /> <input id="mediaItemMediaType_4" class="mediaItemMediaType" type="hidden" value="ACCOUNT_SERVICE" /> <img id="productImage4" class="mediaListProductImage" src="https://apollo2.dl.playstation.net/cdn/EP0017/NPEA00266_00/vpeZ04ln3F7C3ftC48iwNqShOYfBpXJb.png" /> </td> <td class="productTitleGroup"> <div class="ellipsisOuterWrapper"> <div class="ellipsisInnerWrapper"> <section class="productTitleSection">DC UNIVERSE™ ONLINE</section> <label class="smallLabel productPublisherSection">SONY ONLINE ENTERTAINMENT LLC</label> </div> </div> </td> <td class="productTypeSection"> <label class='mediaType'>Game</label><label class='smallLabel typeNameSmallLabel'>Service</label> </td> <td class="productPurchasedSection"> <label class="purchaseDate">10/11/2013</label> </td> <td class="productExpiresSection"> а как это вытянуть? ![]() |
Цитата:
var str; var r; r=/(?:class="productTitleSection">)([^<]+)/g; str='<section class="productTitleSection">DC UNIVERSE™ ONLINE</section>'; alert(str.match(r)[0].match(/[^>]+$/)[0]); str='<td class="productTypeSection">Game</td>' r=/(?:class="productTypeSection">)([^<]+)/g; alert(str.match(r)[0].match(/[^>]+$/)[0]); |
Часовой пояс GMT +3, время: 14:47. |