<?xml version="1.0"?>\n<VAST version="2.0">\n <Ad>\n <InLine>\n <AdSystem>Applift<\/AdSystem>\n <AdTitle>AppliftRTB<\/AdTitle>\n <Description>AppliftRTB<\/Description>\n <Creatives>\n <Creative>\n <Linear>\n <Duration>00:01:16<\/Duration>\n <VideoClicks>\n <ClickThrough><![CDATA[http:\/\/my.com]]><\/ClickThrough>\n <\/VideoClicks>\n <MediaFiles>\n <MediaFile delivery="progressive" type="video\/mp4" bitrate="500" width="640" height="360"><![CDATA[http:\/\/fgfg4.ssl.mydomain.net\/content\/65cd1c8b69d2143448d7227d388fa5e39eb--video.mp4]]><\/MediaFile>\n <\/MediaFiles>\n <\/Linear>\n <\/Creative>\n <\/Creatives>\n <\/InLine>\n <\/Ad>\n<\/VAST> 

It is necessary to find for example links, their general criterion is that they are between [CDATA [and]]

Closed due to the fact that the essence of the question is not clear to the participants of Visman , aleksandr barakin , Wiktor Stribiżew , Denis Bubnov , αλεχολυτ Jun 15 '17 at 6:42 .

Try to write more detailed questions. To get an answer, explain what exactly you see the problem, how to reproduce it, what you want to get as a result, etc. Give an example that clearly demonstrates the problem. If the question can be reformulated according to the rules set out in the certificate , edit it .

  • And where are the tags (which are in the title) if the text says not to search between tags but between ordinary words, as in plain text. And by the way, what were you trying to do on your own - Mike

1 answer 1

For example, in python:

 import re re.findall(r'(?<=\[CDATA\[).*?(?=]])', 'abc[CDATA[xyz]]----[CDATA[***]]bla-bla') # --> ['xyz', '***'] 

Here:

(?<=\[CDATA\[) - look-behind, what should precede the desired

(?=]]) - look-ahead, what should go after the desired

.*? - we are looking for any characters, non-greedy search

As a result, we are looking for the minimum number of any characters between look-behind and look-ahead.