Regex for between "> and <"something else

jcknick

Client
Регистрация
10.05.2013
Сообщения
154
Благодарностей
9
Баллы
18
Hi guys,

this isn't the first time, I'm running into this.

I need to select the shortest match between:

"> and <"and a few more elements here and there

But every time I'm trying to run it, I get the whole thing up to head tag :-)

How do I escape the "> so that it picks up what I need?

I tried stackoverflow.com, but I'm guessing the question is too easy for them :-)

Thanks in advance..
 

sMax

Client
Регистрация
04.05.2011
Сообщения
132
Благодарностей
49
Баллы
28
Последнее редактирование:

jcknick

Client
Регистрация
10.05.2013
Сообщения
154
Благодарностей
9
Баллы
18
Here's what I'm trying to do:



As you can see it's picking up a ton of redundant code up to the <head> tag... instead of expected result:

Kit Contains: Caressing Body Sorbet (350ml) Mineral Hand Cream (100ml) Mineral Botanic Velvet Cream Wash - Lotus &amp; Chestnut (85ml)

Problem is that the devs on site messed up their inline styling, and it would make more sense for me to just grab everything between > and <something else>, than try and figure out inline css for each item.

I hope I managed to explain myself a bit better...
 

sMax

Client
Регистрация
04.05.2011
Сообщения
132
Благодарностей
49
Баллы
28
OK,
yous screenshot does not show data, so I can't tell.
but your "Before search text:" is too short , it selects everything between the first tag ending with "> and the end selection.
It is the same difference between my first image and the second, it has to be more specific, a longer more distinct pattern needs to be selected. You have not given the example source, so that is all I can say.
 

jcknick

Client
Регистрация
10.05.2013
Сообщения
154
Благодарностей
9
Баллы
18
"Before search text:" is too short
Hey, thanks for the reply, funny that I was expecting that the "Shortest match" checkbox in regex builder looks for shortest matches between specified characters, without being picky :-) I will try to extend the before code, but it would be nice if the builder would be more exact on the input specifications. Or is there a general limitation in regex syntax?
 

sMax

Client
Регистрация
04.05.2011
Сообщения
132
Благодарностей
49
Баллы
28
It actually does.... what ZP version are you using?
Because the current regexp editor does not escape things I see escaped on your screenprint (like the "). Maybe there is an issue there. It should have started taking after the .js">
What uis before the head? , you can pm some of the source if you like.
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)