当前位置:网站首页>Wechat applet regular expression extraction link
Wechat applet regular expression extraction link
2022-07-05 20:02:00 【Dehong demon king】
reason :
Recently, I am developing this small program , For removing watermark , As we all know, interfaces are flooded , Docking with applet , No pressure , It can get a little advertising revenue , It can also be used as a tool for yourself , Input / After pasting the link , You can extract waterless video , Then save it on your phone
problem
By copying the link of the video software, you will get something similar to the following ( It can be seen that it is not pure text ), Already coded
1.56 SlC:/ 90 year **** Makeup teaching # Archaic style # **** teaching # Classic makeup https://v.*5Q7/ Copy this link , open Search for , Watch the video directly !
terms of settlement
Through regular expressions :
1、 New method get_url
get_url:function(string) {
let that=this;
var reg = /(http:\/\/|https:\/\/)((\w|=|\?|\.|\/|&|-)+)/g; if (reg.test(string)) {
return string.match(reg)[0];
} else {
return "";
}
},
2、 Call
var new_copy=that.get_url(that.data.copy);
console.log(new_copy);
effect :
After complete treatment :
Okay , That's it
边栏推荐
- Let's talk about threadlocalinsecurerandom
- 【c语言】快速排序的三种实现以及优化细节
- 成功入职百度月薪35K,2022Android开发面试解答
- aggregate
- c語言oj得pe,ACM入門之OJ~
- id选择器和类选择器的区别
- The difference between ID selector and class selector
- How about testing outsourcing companies?
- 【无标题】
- [hard core dry goods] which company is better in data analysis? Choose pandas or SQL
猜你喜欢
SecureRandom那些事|真伪随机数
图嵌入Graph embedding学习笔记
Bitcoinwin (BCW) was invited to attend Hanoi traders fair 2022
[hard core dry goods] which company is better in data analysis? Choose pandas or SQL
【无标题】
leetcode刷题:二叉树17(从中序与后序遍历序列构造二叉树)
Do you know several assertion methods commonly used by JMeter?
Win10 x64环境下基于VS2017和cmake-gui配置使用zxing以及opencv,并实现data metrix码的简单检测
建立自己的网站(16)
How to safely and quickly migrate from CentOS to openeuler
随机推荐
third-party dynamic library (libcudnn.so) that Paddle depends on is not configured correctl
力扣 1200. 最小绝对差
C language OJ gets PE, OJ of ACM introduction~
力扣 729. 我的日程安排表 I
ffplay文档[通俗易懂]
C#应用程序界面开发基础——窗体控制(6)——菜单栏、工具栏和状态栏控件
Wildcard selector
[C language] three implementations of quick sorting and optimization details
[C language] merge sort
Common operators and operator priority
How about testing outsourcing companies?
Database logic processing function
建议收藏,我的腾讯Android面试经历分享
Tasks in GStreamer
【c语言】快速排序的三种实现以及优化细节
《乔布斯传》英文原著重点词汇笔记(十二)【 chapter ten & eleven】
leetcode刷题:二叉树14(左叶子之和)
Base du réseau neuronal de convolution d'apprentissage profond (CNN)
Debezium series: parsing the default value character set
Is it safe for CICC fortune to open an account online?