TOOLSP
"
WELCOME !

Please ! Use [CODE] tags for your LINKS and CODE.
Favor usar balisas [CODE] para sus vínculos y código.
Merci d'utiliser les balises [CODE] pour vos liens et code.

[code]http://Thank.you[/code]
"
*** GITHUB ***
.
.
URL Resolver [GIT]
.
.
.
.
Jx Update [REDIRECT]
.
.
*** Associated ***
.
Pastebin Your list online
.
mediafire Upload Files
.
imgur Upload Pics
lyngsat TV logos collection
transparent .png
.
http://hola.org free? VPN
Hola.apk free? VPN App.
.
hidester- free Proxy
.
webgrabplus EPG - Eng
xmltv EPG - Fr
kazer EPG - Fr
.
.wordreference Traduction
.
mail.com (fast sign-in)
.
.
Latest topics
» SportsDevil back on Mega
Yesterday at 14:38 by skyhigh

» SportsDevil back on Mega
Fri 17 Nov - 5:30 by jairoxyz

» youtube playlists
Tue 14 Nov - 2:43 by jujuuj

» afromotion
Thu 9 Nov - 13:59 by doctor4979

» ? works on VLC, but not on kodi ?
Mon 6 Nov - 13:06 by jujuuj

» how make a request.post to get a repond
Tue 31 Oct - 16:01 by jujuuj

» how to play this in kodi
Tue 31 Oct - 15:21 by jujuuj

FRIENDS / PARTNERS

forum

créer un forum


limit regex results

View previous topic View next topic Go down

limit regex results

Post by geetee on Fri 23 Jun - 21:14

I want to limit the results from a regex.
Is there a way to regex the file until it finds a certain string and then stop.


Lets say I have this m3u list as an example
Code:
#EXTINF:-1,ABC
http://abclive.abcnews.com/i/abc_live4@136330/index_1200_av-b.m3u8
#EXTINF:-1,BBC
http://bbclive.bbcnews.com/i/abc_live4@136330/index_1200_av-b.m3u8
#EXTINF:-1,CBC
http://cbclive.cbcnews.com/i/abc_live4@136330/index_1200_av-b.m3u8
#EXTINF:-1, STOP STOP
group-title=“ENGLISH STOP HERE” http:null.m3u8
#EXTINF:-1,DBC
http://dbclive.dbcnews.com/i/abc_live4@136330/index_1200_av-b.m3u8
#EXTINF:-1,EBC
http://ebclive.dbcnews.com/i/abc_live4@136330/index_1200_av-b.m3u8

then using
Code:
#EXTINF:-1,(.*?)\n(.*.m3u8)
I can grab all the links, but is there a way to just grab the links up to "STOP STOP" and ignore the rest?

.

geetee

Messages : 7
Date d'inscription : 2017-05-28

View user profile

Back to top Go down

Re: limit regex results

Post by Admin on Sat 24 Jun - 2:18

you'll need two clics instead of one ...

in makelist1
...
<link>$doregex[makelist2]</link>
<expres>(?s)(#EXTINF.*?)#EXTINF:-1, STOP STOP</expres>
<page>this.m3u</page>

in makelist2
<expres>#EXTINF:-1,(.*?)\n(.*.m3u8)</expres>
<page>[makelist1.param1]</page>

Another solution is to use python, but ... not so easy ...

Admin

Messages : 33
Date d'inscription : 2017-03-28

View user profile http://toolsp.forumactif.com

Back to top Go down

Re: limit regex results

Post by solved on Tue 27 Jun - 0:26

let's say it is solved as we have no news ...

solved

Messages : 35
Date d'inscription : 2017-06-27

View user profile

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum