当前位置:网站首页>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
边栏推荐
- selenium 元素信息
- How to retrieve the root password of MySQL if you forget it
- 【obs】QString的UTF-8中文转换到blog打印 UTF-8 char*
- Bzoj 3747 poi2015 kinoman segment tree
- 城链科技数字化创新战略峰会圆满召开
- 建议收藏,我的腾讯Android面试经历分享
- Base du réseau neuronal de convolution d'apprentissage profond (CNN)
- sun.misc.BASE64Encoder报错解决方法[通俗易懂]
- 再忙不能忘安全
- 【c语言】归并排序
猜你喜欢
解决php无法将string转换为json的办法
【obs】QString的UTF-8中文转换到blog打印 UTF-8 char*
Debezium series: record the messages parsed by debezium and the solutions after the MariaDB database deletes multiple temporary tables
Bitcoinwin (BCW) was invited to attend Hanoi traders fair 2022
S7-200smart uses V90 Modbus communication control library to control the specific methods and steps of V90 servo
淺淺的談一下ThreadLocalInsecureRandom
That's awesome. It's enough to read this article
Leetcode brush question: binary tree 14 (sum of left leaves)
Force buckle 729 My schedule I
leetcode刷题:二叉树16(路径总和)
随机推荐
Complete interview questions for interviewers and senior Android engineers in front-line Internet enterprises
aggregate
c語言oj得pe,ACM入門之OJ~
众昂矿业:2022年全球萤石行业市场供给现状分析
Is the education of caiqiantang reliable and safe?
Base du réseau neuronal de convolution d'apprentissage profond (CNN)
2023年深圳市绿色低碳产业扶持计划申报指南
Debezium series: record the messages parsed by debezium and the solutions after the MariaDB database deletes multiple temporary tables
解决Thinkphp框架应用目录下数据库配置信息修改后依然按默认方式连接
Some problems encountered in cocos2d-x project summary
处理文件和目录名
Leetcode skimming: binary tree 10 (number of nodes of a complete binary tree)
Is it safe for CICC fortune to open an account online?
Thread pool parameters and reasonable settings
C#应用程序界面开发基础——窗体控制(5)——分组类控件
Force buckle 1200 Minimum absolute difference
leetcode刷题:二叉树14(左叶子之和)
[OBS] qstring's UTF-8 Chinese conversion to blog printing UTF-8 char*
Interviewer: what is the internal implementation of set data types in redis?
《乔布斯传》英文原著重点词汇笔记(十二)【 chapter ten & eleven】