Есть текст примерно такого содержания
CODE ( html):
скопировать код в буфер обмена
<p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; line-height: 1.5em; "> <b>Синий кит</b> (также <b>голубой кит</b>, или <b>блюва́л</b><sup class="reference" id="cite_ref-.D0.91.D0.A1.D0.AD_0-0" style="line-height: 1em; "><a href="http://ru.wikipedia.org/wiki/%D0%A1%D0%B8%D0%BD%D0%B8%D0%B9_%D0%BA%D0%B8%D1%82#cite_note-.D0.91.D0.A1.D0.AD-0" style="text-decoration: none; color: rgb(6, 69, 173); background-image: none; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: initial initial; ">[1]</a></sup>,</p> <p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; line-height: 1.5em; "> [blog]</p> <p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; line-height: 1.5em; "> Синий кит является типичным представителем <a href="http://ru.wikipedia.org/wiki/%D0%A3%D1%81%D0%B0%D1%82%D1%8B%D0%B5_%D0%BA%D0%B8%D1%82%D1%8B" style="text-decoration: none; color: rgb(6, 69, 173); background-image: none; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: initial initial; " title="Усатые киты">усатых китов</a>, питающихся <a href="http://ru.wikipedia.org/wiki/%D0%9F%D0%BB%D0%B0%D0%BD%D0%BA%D1%82%D0%BE%D0%BD" style="text-decoration: none; color: rgb(6, 69, 173); background-image: none; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: initial initial; " title="Планктон">планктоном</a>.</p> <p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; line-height: 1.5em; "> [/blog]</p> <p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; line-height: 1.5em; "> Выделяют три <a href="http://ru.wikipedia.org/wiki/%D0%9F%D0%BE%D0%B4%D0%B2%D0%B8%D0%B4" style="text-decoration: none; color: rgb(6, 69, 173); background-image: none; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: initial initial; " title="Подвид">подвида</a> синего кита — северный, южный .</p>
Из него нужно получить все строчки между тегами [blog][/blog]
И весь текст без тегов [blog][/blog]включая их содержимое.
вот что написал но не работает.(Отредактировано автором: 10 Октября, 2011 - 15:27:08)
|