文本分割问题
{:4_89:}学艺不精来问问题了以下这样的文本该怎么分割?我需要得到m3u8格式的集数,还有链接,而且$$$后面的链接也一样需要分割,另外获取,我找了很多例程看,硬是没看懂。
第01集$https://www.*****.com:65/20200731/58gRhq2N/index.m3u8
第02集$https://www.*****.com:65/20200801/hSryqc8q/index.m3u8
第03集$https://www.*****.com:65/20200802/Ljh0e0Nx/index.m3u8
第04集$https://www.*****.com:65/20200805/LJ5BdIFU/index.m3u8
第05集$https://www.*****.com:65/20200806/osbCfbBr/index.m3u8
第06集$https://www.*****.com:65/20200808/DS1ZyDMM/index.m3u8
第07集$https://www.*****.com:65/20200808/K82uyeHA/index.m3u8
第08集$https://www.*****.com:65/20200809/2Z3lHELy/index.m3u8
第09集$https://www.*****.com:65/20200812/NK0qxbYU/index.m3u8
第10集$https://www.*****.com:65/20200813/NFdKmByB/index.m3u8
第11集$https://www.*****.com:65/20200814/beldYx7f/index.m3u8
第12集$https://www.*****.com:65/20200815/NttNJn4l/index.m3u8
第13集$https://www.*****.com:65/20200816/QLyQZZyG/index.m3u8
第14集$https://www.*****.com:65/20200819/SlrYfuSC/index.m3u8
第15集$https://www.*****.com:65/20200820/d3sIDhVI/index.m3u8$$$第01集$https://www.*****.com:65/share/ANE2F4zX7ZdYyrXg
第02集$https://www.*****.com:65/share/QwJhmXQv1V7HA9eP
第03集$https://www.*****.com:65/share/3VSbRlGRGNxnYM8G
第04集$https://www.*****.com:65/share/teK5BhMuf9Rix3Zh
第05集$https://www.*****.com:65/share/UMWGyohSmfI4FKYz
第06集$https://www.*****.com:65/share/2kE9P3ezuwxDmOgP
第07集$https://www.*****.com:65/share/ReKQ0KUofRVwil81
第08集$https://www.*****.com:65/share/3S25ObVkcaS0GyVU
第09集$https://www.*****.com:65/share/151gwFW4oQqKT7Wn
第10集$https://www.*****.com:65/share/sFDmfjwYV7jr2dsj
第11集$https://www.*****.com:65/share/aHoulqZP1g6E2fgq
第12集$https://www.*****.com:65/share/ak0MOn397r1XGH0V
第13集$https://www.*****.com:65/share/yHE8RCjfEK1wzBhD
第14集$https://www.*****.com:65/share/3B0DlBlxzul9qxlH
第15集$https://www.*****.com:65/share/Hahm2TVpRuMgdasU
建议把网址发出来,直接给你源码多好! 本帖最后由 342188122 于 2020-8-20 17:40 编辑
这个简单,你指定分割符,分割为数组,要哪部分,直接在数组里面取
比如数组 = 分割文本(“待分割文本”,“$”)
现分割$$$,在分割用换行符 之后再用$分割 测试可以匹配到想要的链接
如果需要获取后面的链接
则需要第15集$https://www.*****.com:65/share/Hahm2TVpRuMgdasU 后面的代码 进来看看了解一下 11111111111111111111111 进来看看了解一下 割问题 [修
页:
[1]
2