当前位置:网站首页>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
边栏推荐
- Debezium series: modify the source code to support drop foreign key if exists FK
- Based on vs2017 and cmake GUI configuration, zxing and opencv are used in win10 x64 environment, and simple detection of data matrix code is realized
- Bzoj 3747 poi2015 kinoman segment tree
- Flume series: interceptor filtering data
- Base du réseau neuronal de convolution d'apprentissage profond (CNN)
- sun. misc. Base64encoder error reporting solution [easy to understand]
- 解决Thinkphp框架应用目录下数据库配置信息修改后依然按默认方式连接
- C application interface development foundation - form control (5) - grouping control
- 线程池参数及合理设置
- 解决php无法将string转换为json的办法
猜你喜欢
Interviewer: what is the internal implementation of set data types in redis?
Go language | 02 for loop and the use of common functions
js实现禁止网页缩放(Ctrl+鼠标、+、-缩放有效亲测)
Android interview classic, 2022 Android interview written examination summary
使用 RepositoryProvider简化父子组件的传值
图嵌入Graph embedding学习笔记
四万字长文说operator new & operator delete
Redis cluster simulated message queue
C#应用程序界面开发基础——窗体控制(5)——分组类控件
CADD课程学习(7)-- 模拟靶点和小分子相互作用 (半柔性对接 AutoDock)
随机推荐
C langue OJ obtenir PE, ACM démarrer OJ
That's awesome. It's enough to read this article
[C language] string function and Simulation Implementation strlen & strcpy & strcat & StrCmp
Elk distributed log analysis system deployment (Huawei cloud)
Leetcode skimming: binary tree 10 (number of nodes of a complete binary tree)
港股将迎“最牛十元店“,名创优品能借IPO突围?
Based on vs2017 and cmake GUI configuration, zxing and opencv are used in win10 x64 environment, and simple detection of data matrix code is realized
力扣 1200. 最小绝对差
Where is the operation of new bonds? Is it safer and more reliable to open an account
什么是pyc文件
手机股票开户安全吗?靠不靠谱啊?
Is it safe for Guosen Securities to open an account online?
成功入职百度月薪35K,2022Android开发面试解答
Wildcard selector
通配符选择器
S7-200smart uses V90 Modbus communication control library to control the specific methods and steps of V90 servo
图嵌入Graph embedding学习笔记
Webuploader file upload drag upload progress monitoring type control upload result monitoring control
Is it safe to open a mobile stock account? Is it reliable?
leetcode刷题:二叉树14(左叶子之和)