hi, I have the following line in a text file:
this is my webpage https://www.mywebpage.com
I'm trying to find a way to capture that line as a variable, and the output would delete everything before the https. So in other words, the output would be:
https://www.mywebpage.com
basically it gets rid of "this is my webpage"..it gets rid of everything before the https. The catch is: it must be before the https, not just the h, for example.
..is this a simple task? I'm searching but can't find the right topic to help with the solution..
Remove everything before https
-
- Posts: 854
- Joined: 21 Dec 2015, 02:34
Re: Remove everything before https
https://autohotkey.com/docs/commands/LoopReadFile.htmscriptor2016 wrote: I'm searching but can't find the right topic to help with the solution..
https://autohotkey.com/docs/commands/IfInString.htm
https://autohotkey.com/docs/commands/StringReplace.htm
See also
https://autohotkey.com/docs/commands/StringSplit.htm
-
- Posts: 854
- Joined: 21 Dec 2015, 02:34
Re: Remove everything before https
thanks GEV, I decided to insert an asterisk infront of the https so the line now reads:
this is my webpage * https://www.mywebpage.com
..and I was able to read the entire string, locate the * and then remove everything before it. I read the docs but found it was a little daunting to figure out- it looks like trying to find an entire word (in this case, https) would be more difficult as opposed to just trying to find a single character (such as the asterisk). I was able to find topics that discussed how to remove all text before or after single characters (like an asterisk) much easier than trying to remove all text before or after a full word (like https). I will continue to read the links you provided, however. I may need to re-visit this topic very shortly as I am again re-treating to my original question, since my "asterisk" idea is working only intermittently
this is my webpage * https://www.mywebpage.com
..and I was able to read the entire string, locate the * and then remove everything before it. I read the docs but found it was a little daunting to figure out- it looks like trying to find an entire word (in this case, https) would be more difficult as opposed to just trying to find a single character (such as the asterisk). I was able to find topics that discussed how to remove all text before or after single characters (like an asterisk) much easier than trying to remove all text before or after a full word (like https). I will continue to read the links you provided, however. I may need to re-visit this topic very shortly as I am again re-treating to my original question, since my "asterisk" idea is working only intermittently
Re: Remove everything before https
you can use RegExReplace.
You wan't to remove everything before https or you just want to get the webpage address?
Code: Select all
text = this is my webpage https://www.mywebpage.com
text := RegExReplace(text,".*?(?=https)")
MsgBox % text
Re: Remove everything before https
I think 'scriptor2016' want url
a complicated script example here which can be made easier
RadioTest.txt
a complicated script example here which can be made easier
Code: Select all
;sql database for radio stations search here the latest
;http://www.radio-browser.info/backups/?C=M;O=D
;F1=http://www.radio-browser.info/backups/backup_2016-11-13.sql.gz
;urldownloadtofile,%f1%,backup_2016-11-13.sql.gz
;return
f1=%a_scriptdir%\RadioTest.txt
Extensions1 := "mp3,m3u,ogg,pls,aac,192k"
; full file found 5365 url's
fileread,aacc,%f1%
d1=0
A:="http"
T=
e:=""
;- search for radio-url ------------------
Loop,parse,aacc,`n,
{
r=
stringlen,L1,A
T=%A_LoopField%
StringReplace t,T,.%A_Space%,`,,All
StringRight r,t,1
IfEqual r,., StringTrimRight t,t,1
Loop Parse,t,`'
{
StringLeft r,A_LoopField,L1
If (r=A)
{
x:=a_loopfield
; don't show these url's
if x contains picture:
continue
if x contains :8000
continue
if x contains :9000
continue
z .= x . "`r`n" ;- all for test
StringTrimLeft, x2, x, 7
SplitPath,x, nameNos, dir, ext, name_no_ext, drive
;-------------------------------
if ext in %Extensions1%
{
StringSplit,h,x, `;
StringSplit,c,h1, `?
SplitPath,c1, name, dir, ext, name_no_ext, drive
;msgbox,name=%name%`nDIR=%dir%`nEXT=%ext%`nNAME_NO_EXT=%name_no_ext%`nDRIVE=%drive%
e .= c1 "`r`n"
continue
}
;-------------------------------
;------------------------
if x2 contains :
{
i=0
loop,parse,x2,
{
i++
y:= a_loopfield
stringmid,z,x2,i,2
stringmid,z1,z,1,1
stringmid,z2,z,2,1
if (z1=":")
{
;msgbox,zx=%z1%%z2%
if z2 is number
{
StringSplit,u,x, `;
StringSplit,v,u1, `?
SplitPath,v1, name, dir, ext, name_no_ext, drive
e .= v1 "`r`n"
continue
}
}
}
}
}
}
}
aacc=
z=
sort,e,U
f2=%a_scriptdir%\test55.txt
if e<>
{
ifexist,%f2%
filedelete,%f2%
fileappend,%e%,%f2%
run,%f2%
}
e=
return
;============================================
Code: Select all
LOCK TABLES `Station` WRITE;
/*!40000 ALTER TABLE `Station` DISABLE KEYS */;
INSERT INTO `Station` VALUES (32815,'??? ??????','http://81.19.85.197/echo.mp3','http://echo.msk.ru/','http://echo.msk.ru/i/big_logo.png','2016-04-12 20:40:08','Russia','Russian','',16,2,NULL,'',7,4,'2016-11-12 18:25:41','MP3',1,'2016-11-12 18:50:33',140,'http://81.19.85.197/echo.mp3','2016-11-12 18:50:33'),(14,'MDR Klassik','http://avw.mdr.de/livestreams/mdr_klassik_live_128.m3u','http://www.mdr.de/mdr-klassik/','http://www.mdr.de/resources/global/img/base/mdr_logo.svg','2016-06-29 17:17:38','Germany','German','classical',54,4,NULL,'',0,-1,'2016-11-13 05:24:19','MP3',1,'2016-11-12 15:10:03',0,'http://c22033-ls.i.core.cdn.streamfarm.net/spmL904bJ9922033/22033mdr/live/app2128740352/w2128904196/live_de_128.mp3','2016-11-12 15:10:03'),(87420,'Radio X London','http://media-the.musicradio.com/RadioXLondon','http://www.radiox.co.uk','http://radiox.gcstatic.com/d/xfm.co.uk/img/favicon.png','2016-07-08 11:45:13','United Kingdom','English','',5,0,NULL,'London',1,0,'2016-11-12 19:58:05','AAC+',1,'2016-11-13 02:40:28',48,'http://media-the.musicradio.com/RadioXLondon','2016-11-13 02:40:28'),(16,'mth.House','http://stream.mth-house.de:8500/;','http://www.shouted.fm/index.php?area=house','http://www.shouted.fm/favicon.ico','2016-08-23 02:28:22','Germany','German','house',7,1,NULL,'',0,-1,'2016-11-13 00:42:06','MP3',1,'2016-11-12 17:00:01',128,'http://stream.mth-house.de:8500/;','2016-11-12 17:00:01'),(42767,'Fun Radio (France)','http://ais.rtl.fr:80/fun-1-44-128','http://www.funradio.fr/','http://static.funradio.fr/versions/www/6.0.74/img/fun_fb.jpg','2016-08-01 02:38:34','France','French','',29,1,NULL,'',0,0,'2016-11-07 12:39:57','MP3',1,'2016-11-12 23:50:15',128,'http://ais.rtl.fr:80/fun-1-44-128','2016-11-12 23:50:15'),(57659,'GO! FM','http://gofm.radiostreaming.dk:8050/gofm','http://www.gofm.dk','https://static.wixstatic.com/media/849c7d_0f6f12538ea64b73946d0ac295583004.png','2016-04-12 20:25:52','Denmark','Danish','',0,0,NULL,'',0,0,'2016-11-05 21:06:17','MP3',1,'2016-11-12 20:50:36',128,'http://gofm.radiostreaming.dk:8050/gofm','2016-11-12 20:50:36'),(57656,'Radio Alfa','http://alfa.radiostreaming.dk:8050/alfa.m3u','http://alfa.radiostreaming.dk','','2016-04-11 19:59:30','Denmark','Danish','',0,0,NULL,'',1,1,'2016-11-12 15:13:55','MP3',1,'2016-11-12 23:10:54',160,'http://alfa.radiostreaming.dk:8050/alfa','2016-11-12 23:10:54'),(44899,'Life Radio - Made in Austria','http://liferadio.stream.kapper.net:8001/mia','http://www.liferadio.at/','http://www.liferadio.at/fileadmin/templates/v2/images/player/streams/3.png','2016-04-11 20:05:14','Austria','German','',4,0,NULL,'Upper Austria',0,0,'2016-11-09 16:55:02','MP3',1,'2016-11-12 10:00:03',128,'http://liferadio.stream.kapper.net:8001/mia','2016-11-12 10:00:03'),(44957,'Arabella - Wiener Schmäh','http://arabella.stream.kapper.net:8008/arabellawiener','http://www.arabella.at','http://www.arabella.at/wp-content/themes/arabella/images/favicon.ico','2016-06-27 21:25:41','Austria','German','austrian music,folk,volksmusik',4,0,NULL,'',1,1,'2016-11-12 19:29:56','MP3',1,'2016-11-12 20:50:14',96,'http://arabella.stream.kapper.net:8008/arabellawiener','2016-11-12 20:50:14'),(33,'Radio Lausitz (AAC)','http://stream.radiolausitz.de/RLAU/aac.m3u','http://www.radiolausitz.de','https://pbs.twimg.com/profile_images/378800000824540163/295d20c859161f8d32ab90b5272bba15_normal.jpeg','2016-04-12 20:23:49','Germany','German','',3,1,NULL,'',0,0,'2016-10-23 14:25:52','AAC+',1,'2016-11-12 15:30:23',48,'http://streaming.radiolausitz.de/radio-lausitz_simulcast_48k_aac','2016-11-12 15:30:23'),(45045,'RSA Sachsen (AAC 64kb/s)','http://streams.rsa-sachsen.de/rsa-live/aac-64/streams.rsa-sachsen.de/play.pls','http://www.rsa-sachsen.de/','http://www.rsa-sachsen.de/images/RSA/logo.png','2016-04-17 22:10:49','Germany','German','',2,0,NULL,'Saxony',2,2,'2016-11-12 21:02:18','AAC',1,'2016-11-12 20:40:15',64,'http://regiocast.hoerradar.de/rsasachsen-live-aac-mq?sABC=5827701s%230%23n773r87961726n9p9r0pq75s80n80205%23fgernzf.efn-fnpufra.qr&amsparams=playerid:streams.rsa-sachsen.de;skey:1478979615','2016-11-12 20:40:15'),(45044,'RSA Sachsen (MP3 192kb/s)','http://streams.rsa-sachsen.de/rsa-live/mp3-192/streams.rsa-sachsen.de/play.pls','http://www.rsa-sachsen.de/','http://www.rsa-sachsen.de/images/RSA/logo.png','2016-04-17 22:12:01','Germany','German','',2,0,NULL,'Saxony',0,0,'2016-10-29 19:34:13','MP3',1,'2016-11-12 10:10:40',192,'http://regiocast.hoerradar.de/rsasachsen-live-mp3-hq?sABC=5826qp8s%230%23n773r87961726n9p9r0pq75s80n80205%23fgernzf.efn-fnpufra.qr&amsparams=playerid:streams.rsa-sachsen.de;skey:1478941839','2016-11-12 10:10:40'),(56,'RTÉ Radio 1','http://av.rasset.ie/av/live/radio/radio1.m3u','http://www.rte.ie/radio','http://www.liveradio.ie/files/images/117585/resized/140x134c/rte_radio_1.jpg','2016-06-28 17:08:38','Ireland','English','general,talk,news',38,1,NULL,'',7,4,'2016-11-12 17:20:01','MP3',1,'2016-11-12 12:20:16',96,'http://icecast1.rte.ie/radio1','2016-11-12 12:20:16'),(45473,'Mouv\'','http://aechai9hib.lb.vip.cdn.dvmr.fr/mouv-midfi.mp3','http://www.mouv.fr/','http://www.mouv.fr/favicon.ico','2016-10-05 10:27:02','France','French','',11,1,NULL,'',0,0,'2016-11-03 19:38:15','MP3',1,'2016-11-13 00:30:12',0,'http://aechai9hib.lb.vip.cdn.dvmr.fr/mouv-midfi.mp3','2016-11-13 00:30:12'),(63,'Energy Sachsen','http://www.energyradio.de/sachsen','http://www.energy.de','http://www.energy.de/sites/default/files/logo.png','2016-10-05 12:17:26','Germany','German','techno,rnb,dance,pop',17,10,NULL,'Saxony',1,-1,'2016-11-12 04:06:54','AAC+',1,'2016-11-13 02:20:18',64,'http://185.52.127.157/de/33013/aac_64.mp3','2016-11-13 02:20:18'),(71911,'Nirvana Radio Ambient [MP3]','http://radio.108.pl:8002/listen.pls','http://www.108.pl/','http://www.108.pl/public/images/listener.jpg','2016-09-09 05:20:58','Poland','Polish','Ambient',9,0,NULL,'',2,0,'2016-11-12 22:13:27','MP3',1,'2016-11-13 01:30:14',128,'http://radio.108.pl:8002/','2016-11-13 01:30:14'),(45089,'Okerwelle 104.6','http://www.okerwelle.de/webradio/live.m3u','http://www.okerwelle.de/','http://okerwelle.de/cms/fileadmin/template/images/favicon.ico','2016-05-24 01:35:23','Germany','German','Bürgerfunk',2,1,NULL,'Lower Saxony',0,-1,'2016-11-10 22:51:01','MP3',1,'2016-11-12 09:51:24',128,'http://streamplus25.leonex.de:26116','2016-11-12 09:51:24'),(45211,'MDR Figaro','http://avw.mdr.de/livestreams/mdr_figaro_live_128.m3u','http://www.mdr.de/mdr-figaro/','http://www.mdr.de/resources/global/img/base/mdr_logo.svg','2016-06-29 17:15:26','Germany','German','culture,classic',23,0,NULL,'',1,-1,'2016-11-11 19:18:29','MP3',1,'2016-11-12 15:10:03',0,'http://c22033-ls.i.core.cdn.streamfarm.net/HZSKMnDUg9922033/22033mdr/live/app2128740352/w2128904193/live_de_128.mp3','2016-11-12 15:10:03'),(45170,'YOU FM Sounds','http://hr-mp3-m-youfm-sounds.akacast.akamaistream.net/7/360/142137/v1/gnl.akacast.akamaistream.net/hr-mp3-m-youfm-sounds','http://www.you-fm.de/','http://www.hr-online.de/website/radio/you_fm/images/favicon.ico','2016-05-24 01:33:33','Germany','German','rock',3,0,NULL,'Hessen',3,3,'2016-11-12 17:17:59','MP3',1,'2016-11-12 15:50:22',128,'http://hr-mp3-m-youfm-sounds.akacast.akamaistream.net/7/360/142137/v1/gnl.akacast.akamaistream.net/hr-mp3-m-youfm-sounds','2016-11-12 15:50:22'),(45110,'Hit Radio FFH - Top 40','http://streams.ffh.de/ffhchannels/mp3/hqtop40.m3u','http://www.ffh.de/','http://www.ffh.de/fileadmin/_processed_/csm_t_home_logo_6c85a805ac.jpg','2016-04-18 15:08:42','Germany','German','top 40',1,0,NULL,'Hessen',0,0,'2016-11-09 22:45:35','MP3',1,'2016-11-13 00:40:43',128,'http://mp3.ffh.de/ffhchannels/hqtop40.mp3','2016-11-13 00:40:43'),(45066,'Pop Radio 1','http://193.34.51.130/rock_mp3','http://www.pop-radio.de/','http://www.rautemusik.fm/bundles/rmpage/images/main/logo.png','2016-05-31 19:14:40','Germany','','rock',0,1,NULL,'',0,0,NULL,'MP3',0,'2016-11-13 04:10:45',192,'','2016-10-30 08:00:46'),(45027,'Radio Unerhört Marburg','http://stream.radio-rum.de:8000/rum.mp3.m3u','http://www.radio-rum.de/','http://www.radio-rum.de/blog/wp-content/uploads/2015/10/cropped-piradio_Amod_col-270x270.gif','2016-06-12 19:09:15','Germany','German','',2,0,NULL,'Hessen',1,0,'2016-11-12 16:11:51','MP3',1,'2016-11-12 13:50:02',128,'http://stream.radio-rum.de:8000/rum.mp3','2016-11-12 13:50:02'),(45073,'radio flora','http://www.radioflora.de/stream/live192.mp3','http://www.radioflora.de/','http://www.radioflora.de/contao//tl_files/crossbrowsers/favicons/apple_touch_icon.png','2016-04-14 11:52:30','Germany','','',2,0,NULL,'',0,0,'2016-11-05 15:48:37','MP3',1,'2016-11-12 20:50:19',192,'http://88.198.12.12:8000/live192.mp3','2016-11-12 20:50:19'),(45096,'radioeins RBB Berlin','http://radioeins.de/stream','http://www.radioeins.de/','http://presseservice.rbb-online.de/bilder/mediendb/rbb/img/240x135/logos_sendungen/radioeins_logo_240.jpg','2016-09-16 15:09:10','Germany','German','adult contemporary,alternative,rock,pop,adult hits,info,Infotainment',107,0,NULL,'Berlin-Brandenburg',33,10,'2016-11-13 05:40:21','MP3',1,'2016-11-12 13:20:03',128,'http://rbb-mp3-radioeins-m.akacast.akamaistream.net/7/854/292097/v1/gnl.akacast.akamaistream.net/rbb_mp3_radioeins_m','2016-11-12 13:20:03'),(82806,'Radio 21','http://188.94.97.91/radio21.mp3','http://www.radio21.de','http://www.radio21.de/typo3conf/ext/ch_radio21/Resources/Public/example/Radio21_Logo.png','2016-04-18 14:51:50','Germany','German','classic rock,Rock',17,0,NULL,'Lower Saxony',1,-1,'2016-11-12 09:49:54','MP3',1,'2016-11-12 10:10:34',192,'http://188.94.97.91/radio21.mp3','2016-11-12 10:10:34'),(45132,'Energy Pop','http://www.energyradio.de/pop','http://www.energy.de/','http://www.energy.de/sites/all/themes/zen_energy/images/ENERGY_LOGO_POP.png','2016-10-25 20:49:05','Germany','German','',3,1,NULL,'',0,-1,'2016-11-11 09:54:01','MP3',1,'2016-11-12 19:20:31',128,'http://185.52.127.131/de/33037/mp3_128.mp3','2016-11-12 19:20:31'),(45186,'MDR SPUTNIK Popkult-Stream','http://www.sputnik.de/m3u/popkult.hi.m3u','http://www.sputnik.de','http://www.sputnik.de/favicon.ico','2016-04-18 13:06:50','Germany','German','pop',2,0,NULL,'',0,0,'2016-10-22 22:28:23','MP3',1,'2016-11-12 15:40:26',0,'http://c22033-l.i.core.cdn.streamfarm.net/22033mdr/live/3087mdr_sputnik/ch_popkult_128.mp3','2016-11-12 15:40:26'),(45065,'Power Radio','http://stream.power-radio.de:8020/','http://www.power-radio.de/','','2016-04-11 19:59:30','Germany','German','',7,0,NULL,'',0,0,'2016-10-27 20:14:44','MP3',1,'2016-11-12 19:50:13',128,'http://stream.power-radio.de:8020/','2016-11-12 19:50:13'),(45166,'Radio 7 Entschleuniger','http://srv01.radio7.fmstreams.de/stream1/livestream.mp3.m3u','http://entschleuniger.radio.de/','http://entschleuniger.radio.de/favicon.ico','2016-06-02 22:14:08','Germany','German','',0,0,NULL,'',0,0,'2016-11-08 18:13:52','MP3',1,'2016-11-13 00:10:04',128,'http://217.151.154.57:80/stream1/livestream.mp3','2016-11-13 00:10:04'),(45069,'Freies Radio Wüste Welle','http://livestream.wueste-welle.de:8000/mp3.m3u','http://www.wueste-welle.de/','http://www.wueste-welle.de/i/wueste-welle-root-anzeigebild-fb.jpg','2016-04-12 20:32:31','Germany','','',3,1,NULL,'',0,0,'2016-10-24 19:23:12','MP3',1,'2016-11-13 04:10:13',192,'http://livestream.wueste-welle.de:8000/mp3','2016-11-13 04:10:13'),(45316,'Rhône FM','http://rhonefm.ice.infomaniak.ch/rhonefm-high.mp3','http://www.rhonefm.ch','http://www.rhonefm.ch/js/html5player/player_item/img/no_cover.jpg','2016-06-01 22:47:06','Switzerland','French','',1,0,NULL,'Suisse Romande',0,0,'2016-11-06 07:59:24','MP3',1,'2016-11-13 01:30:05',128,'http://rhonefm.ice.infomaniak.ch/rhonefm-high.mp3','2016-11-13 01:30:05'),(45391,'Demoiselle Rochefort','http://demoisellefm.ice.infomaniak.ch/demoisellefm-128.mp3','http://www.demoisellefm.net/','http://www.demoisellefm.net/demoiselle/images/favicon.ico','2016-04-19 01:57:25','France','French','',0,0,NULL,'Aquitaine-Limousin-Poitou-Charentes',0,0,NULL,'MP3',1,'2016-11-13 02:10:22',128,'http://demoisellefm.ice.infomaniak.ch/demoisellefm-128.mp3','2016-11-13 02:10:22'),(45038,'103.7 UnserDing - Zukunft','http://streaming02.sr-online.de/unserding-zukunft.m3u','http://www.unserding.de/','http://www.unserding.de/favicon.ico','2016-04-25 09:42:07','Germany','German','pop',1,3,NULL,'Saarland',0,0,'2016-11-10 16:25:24','MP3',1,'2016-11-12 23:30:17',128,'http://udc2.akacast.akamaistream.net/7/27/142688/v1/gnl.akacast.akamaistream.net/udc2','2016-11-12 23:30:17'),(45020,'Bremen Vier (4) - Radio Bremen','http://www.radiobremen.de/stream/live/bremenvier.m3u','http://www.radiobremen.de/bremenvier/','http://www.radiobremen.de/favicon.ico','2016-07-28 01:28:57','Germany','German','rock,pop',12,0,NULL,'Bremen',0,-2,'2016-11-11 08:02:04','MP3',1,'2016-11-12 18:20:32',128,'http://rb-mp3-m-bremenvier.akacast.akamaistream.net/7/23/234437/v1/gnl.akacast.akamaistream.net/rb-mp3-m-bremenvier','2016-11-12 18:20:32'),(45117,'Hit Radio FFH','http://streams.ffh.de/radioffh/mp3/hqlivestream.m3u','http://www.ffh.de/','http://www.ffh.de/fileadmin/_processed_/csm_t_home_logo_6c85a805ac.jpg','2016-11-01 06:42:24','Germany','German','pop,top 40',16,2,NULL,'Hessen',1,0,'2016-11-12 10:27:57','MP3',1,'2016-11-12 10:40:03',128,'http://mp3.ffh.de/radioffh/hqlivestream.mp3','2016-11-12 10:40:03'),(45201,'delta radio','http://streams.deltaradio.de/delta-live/mp3-128/liveradio/','http://www.deltaradio.de/','http://livestream.deltaradio.de/includes/styles/standard/images/logo_big.png','2016-09-21 06:17:14','Germany','German','',28,0,NULL,'Schleswig-Holstein',0,-1,'2016-11-11 07:56:03','MP3',1,'2016-11-12 11:00:25',128,'http://regiocast.hoerradar.de/deltaradio128?sABC=5826r837%230%23r115nr705s0r897o2p4pq98r76o36594%23yvirenqvb&amsparams=playerid:liveradio;skey:1478944823','2016-11-12 11:00:25'),(45139,'DIE NEUE 107.7','http://edge.live.mp3.mdn.newmedia.nacamar.net/ps-dieneue_livesongs/livestream_hi.mp3.m3u','http://www.dieneue1077.de/','http://dieneue1077.de/themes/analytic/logo.png','2016-04-11 19:59:30','Germany','German','Pop',3,2,NULL,'',0,0,'2016-11-08 17:35:23','MP3',1,'2016-11-12 19:50:33',128,'http://edge.live.mp3.mdn.newmedia.nacamar.net:80/ps-dieneue_livesongs/livestream_hi.mp3','2016-11-12 19:50:33'),(45093,'Hitradio Ohr','http://players.creacast.com/creacast/hitradio_ohr/playlist.pls','http://www.radio-ohr.de/','http://www.hitradio-ohr.de/sites/all/themes/hitradio_ohr/favicon.ico','2016-06-05 08:39:33','Germany','','',1,0,NULL,'',0,-1,'2016-11-11 08:47:19','MP3',1,'2016-11-12 16:20:18',128,'http://str0.creacast.com/hitradio_ohr','2016-11-12 16:20:18'),(45167,'Radio 7 2000er','http://players.creacast.com/creacast/radio7_up/playlist.xspf','http://www.radio7.de','http://www.radio7.de/favicon.ico','2016-04-11 19:59:30','Germany','','',0,0,NULL,'',0,0,'2016-11-08 18:13:55','UNKNOWN',1,'2016-11-12 20:50:37',0,'http://players.creacast.com/creacast/radio7_up/playlist.xspf','2016-11-12 20:50:37'),(72032,'Hit Radio FFH - Eurodance','http://streams.ffh.de/ffhchannels/mp3/hqeurodance.m3u','http://www.ffh.de/','http://www.ffh.de/favicon.ico','2016-04-18 15:08:19','Germany','German','eurodance',5,0,NULL,'Hessen',8,8,'2016-11-12 15:54:44','MP3',1,'2016-11-13 00:30:23',128,'http://mp3.ffh.de/ffhchannels/hqeurodance.mp3','2016-11-13 00:30:23'),(72035,'Hit Radio FFH - Schlagerkult','http://streams.ffh.de/ffhchannels/mp3/hqschlager.m3u','http://www.ffh.de','http://www.ffh.de/favicon.ico','2016-04-18 15:08:29','Germany','German','schlager',1,0,NULL,'Hessen',0,0,'2016-11-05 11:11:48','MP3',1,'2016-11-13 01:10:20',128,'http://mp3.ffh.de/ffhchannels/hqschlager.mp3','2016-11-13 01:10:20'),(86789,'Radio Almaina','http://192.99.35.215:5076/stream.mp3','https://radioalmaina.org/','http://radioaktivat.org/wp-content/uploads/2014/12/radio-almaina.jpg','2016-07-16 19:44:36','Spain','Spanish','comunitaria,community,libre',8,0,NULL,'Granada',1,1,'2016-11-12 14:39:02','MP3',1,'2016-11-12 21:40:13',128,'http://192.99.35.215:5076/stream.mp3','2016-11-12 21:40:13'),(45127,'apollo radio','http://streaming.apolloradio.de/apolloradio_simulcast_192k_mp3','http://www.apolloradio.de/','http://www.apolloradio.de/favicon.ico','2016-05-24 01:38:07','Germany','German','',4,0,NULL,'',0,0,'2016-11-05 16:13:09','MP3',1,'2016-11-12 18:40:04',192,'http://streaming.apolloradio.de/apolloradio_simulcast_192k_mp3','2016-11-12 18:40:04'),(45021,'Bremen Eins (1) - Radio Bremen','http://httpmedia.radiobremen.de/bremeneins.m3u','http://www.radiobremen.de/bremeneins/','http://www.radiobremen.de/bremeneins/bremeneinslogo100_v-mobil4x3x800.jpg','2016-07-28 01:29:24','Germany','German','oldies',11,2,NULL,'Bremen',0,-2,'2016-11-11 19:46:18','MP3',1,'2016-11-12 21:30:29',128,'http://rb-mp3-m-bremeneins.akacast.akamaistream.net/7/716/234436/v1/gnl.akacast.akamaistream.net/rb-mp3-m-bremeneins','2016-11-12 21:30:29'),(45183,'MDR SPUTNIK Rock-Stream','http://www.sputnik.de/m3u/rock.hi.m3u','http://www.sputnik.de','http://www.sputnik.de/favicon.ico','2016-04-18 13:07:14','Germany','German','rock',3,0,NULL,'',1,1,'2016-11-12 02:35:10','MP3',1,'2016-11-12 17:11:07',0,'http://c22033-l.i.core.cdn.streamfarm.net/22033mdr/live/3087mdr_sputnik/ch_rock_128.mp3'
-
- Posts: 854
- Joined: 21 Dec 2015, 02:34
Re: Remove everything before https
thanks ahcahc, yes that worked perfectly! I just wanted to remove everything before the https.
garry- thanks for the help as well, but - I'm not sure?
garry- thanks for the help as well, but - I'm not sure?
Re: Remove everything before https
an easy solution for this example ?
( space before and after url , or maybe another delimiters e.g = ' , ; )
and search also for http
EDIT :
example works
( space before and after url , or maybe another delimiters e.g = ' , ; )
and search also for http
Code: Select all
text:="
(Ltrim Join`r`n
this is my webpage https://www.mywebpage1.com aaaa https://www.mywebpage2.com bbbb
xxx https://www.mywebpage3.com cccc yyy https://www.mywebpage4.com dddd
zzz https://www.mywebpage5.com eee
"
)
text := RegExReplace(text,".*?(?=https)")
MsgBox % text
example works
Code: Select all
;-------- https://autohotkey.com/boards/viewtopic.php?f=5&t=24549 ---
#warn
z:=""
text:="
(Ltrim Join`r`n
this is my webpage https://www.mywebpage2.com aaaa https://www.mywebpage4.com bbbb
xxx http://www.mywebpage3.com cccc yyy https://www.mywebpage5.com dddd
zzz https://www.mywebpage1.com eee
"
)
;text := RegExReplace(text,".*?(?=https)")
;MsgBox % text
A:="http"
stringlen,L1,A
Loop,parse,text,`n,
{
Loop, Parse,A_LoopField,%a_space%
{
StringLeft r,A_LoopField,L1
If (r=A)
z .= a_loopfield . "`r`n"
}
}
sort,z,U
msgbox,%z%
exitapp
;============================================
Re: Remove everything before https
@garry
Code: Select all
text:="
(Ltrim Join`r`n
this is my webpage https://www.mywebpage2.com aaaa https://www.mywebpage4.com bbbb
xxx http://www.mywebpage3.com cccc yyy https://www.mywebpage5.com dddd
zzz https://www.mywebpage1.com eee
"
)
text2 := trim(RegExReplace(text,"s).*?(https?:\/\/\w+?(?:\.\w+)+).*?|.*","$1`n")," `n`r")
MsgBox % text2
while pos := RegExMatch(text,"https?:\/\/\w+?(?:\.\w+)+", m, a_index=1?1:pos+StrLen(m))
text3 .= m "`n"
msgbox % text3
Re: Remove everything before https
@ahcahc , thank you for the regex examples
Who is online
Users browsing this forum: Anput and 219 guests