Ошибка REGEX
-
Привет, ребята, снова ... Кто-нибудь знает, как решить это регулярное выражение?
</ span> <br> <i class = "material-icons" style = "position: relative; top: 2px;"> избранное </ i> <span style = "font-weight: 600;"> 15 </ span> нравится </ p>
Я хочу захватить номер 15.
Я использовал это выражение: «> ([\ s \ S] +) </ span> \ likes \ </ p>. Но он захватывает весь текст ...
Заранее спасибо!
-
@nicog xpath пробовали? Удобнее будет по идеи
-
@nicog
(\d+) <\/
-
@senerg Спасибо, но это не сработало
-
@uraabk Это хорошая идея, я попробую прямо сейчас
-
-
Дело в том, что это настоящий текст:
<p> <span style = "font-weight: 600;"> <a href="/profile/lidiaubi/" style="text-decoration: none; color: #666666; font-weight: 600;"> @ lidiaubi </a> </ span> <span> Город бедствий <a style = "text-decoration: none;" href = "/ tag / chequia /"> # chequia </a> <a style = "text-decoration: none;" href = "/ tag / travelgirl /"> # travelgirl </a> <a style = "text-decoration: none;" href = "/ tag / praga /"> # praga </a> <a style = "text-decoration: none;" href = "/ tag / ciudadvieja /"> # ciudadvieja </a> <a style = "text-decoration: none;" href = "/ tag / torredelapolvora /"> # torredelapolvora </a> <a style = "text-decoration: none;" href = "/ tag / relojastronomico /"> # relojastronomico </a> <a style = "text-decoration: none;" href = "/ tag / praha /"> # praha </a> <a style = "text-decoration: none;" href = "/ tag / катастрофа /"> # катастрофа </a> <a style = "text-decoration: none;" href = "/ tag / city /"> # city </a> <a style = "text-decoration: none;" href = "/ tag / north /"> # north </a> <a style = "text-decoration: none;" href = "/ tag / cold /"> # cold </a> </ span> <br> <span style = "font-weight: 600;"> <a href = "/ profile / idabukowski /" style = " text-decoration: none, цвет: # 666666; font-weight: 600; "> @ idabukowski </a> </ span> <span> Pretty💫💫✨ </ span> <br> <span style =" font- вес: 600; "> <a href="/profile/andrea_m_m/" style="text-decoration: none; color: #666666; font-weight: 600;"> @andrea_m_m </a> </ span> < span> Más bonita ella que todas las Cosas </ span> <br> <span style = "font-weight: 600;"> <a href = "/ profile / zarabril /" style = "text-decoration: none, цвет : # 666666; font-weight: 600; "> @ zarabril </a> </ span> <span> Guapa </ span> <br> <span style =" font-weight: 600; "> <a href = "/ profile / georxsparkle /" style = "text-decoration: none, цвет: # 666666; font-weight: 600;"> @ georxsparkle </a> </ span> <span> Меня окружает прага! Disfruta 😍 </ span> <br> <span style = "font-weight: 600;"> <a href = "/ profile / carlosperis1 /" style = "text-decoration: none, color: # 666666; font-weight : 600; "> @ carlosperis1 </a> </ span> <span> Que sonrisilla jejeje 😘 </ span> <br> <i class =" material-icons "style =" position: relative; top: 2px; " > любимый </ i> <span style = "font-weight: 600;"> 15 </ span> нравится </ p>
-
@nicog это часть текста. Киньте ссылку на сайт лучше. И какой элемент там хотите получить.
-
This post is deleted!
-
@nicog попробуй это. У меня работает.
Xpath получить текст//p/span[@style='font-weight: 600;'][last()]
-
@uraabk said in Ошибка REGEX:
попробуй это. У меня работает.
Xpath получить текстБольшое спасибо!!!! Это сработало!!
-
@nicog попробуй на постах, где нет комментариев. Или нет лайков.