Regex for between "> and <"something else

  • Автор темы Автор темы jcknick
  • Дата начала Дата начала

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..
 
Maybe I misunderstand your question , so if this doesn't help , give an example.
simpleregexp.JPG


Even if you just wanted the blockquote from your question
copy paste the boundaries from what you want in the regexp designer
simpleregexpBlockquote.JPG


see also https://msdn.microsoft.com/en-us/library/hs600312(v=vs.110).aspx
 
Последнее редактирование:
Here's what I'm trying to do:

00000605.png


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...
 
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.
 
"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?
 
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.
 

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