当前位置:网站首页>JS regular verification time test() method
JS regular verification time test() method
2022-06-23 17:40:00 【It workers】
test() Method to detect whether a string matches a pattern .
The rules .test(str);
Return value : If the string contains text that matches the written regular , Then return to true, Otherwise return to false.
In the following example , We will search "W3School":
<script type="text/javascript">
var str = "Visit W3School";
var patt1 = new RegExp("W3School");
var result = patt1.test(str);
document.write("Result: " + result);
</script>Output :
Result: true
边栏推荐
- Elk log collection system deployment
- How to select an oscilloscope? These 10 points must be considered!
- ADC digital DGND, analog agnd mystery!
- 数据库 实验二 查询
- NLP paper reading | improving semantic representation of intention recognition: isotropic regularization method in supervised pre training
- 华为手机通过adb安装APK提示“签名不一致,该应用可能已被修改”
- Query the size of each table in the database
- Jetpack compose and material you FAQs
- How to choose an account opening broker? Is it safe to open an account online now?
- 创新技术领航者!华为云GaussDB获颁2022年云原生数据库领域权威奖项
猜你喜欢

FPN characteristic pyramid network

The company recruited a tester with five years' experience and saw the real test ceiling

Wechat applet: time selector for the estimated arrival date of the hotel

酒店入住时间和离店时间的日期选择

混沌工程在云原生中间件稳定性治理中的实践分享
![[30. concatenate substrings of all words]](/img/e7/453c8524a23fbb7501e85140547ce1.png)
[30. concatenate substrings of all words]

ctfshow php的特性

【网络通信 -- WebRTC】WebRTC 源码分析 -- 接收端带宽估计

Intranet penetration token stealing

Interface ownership dispute
随机推荐
Right leg drive circuit principle? ECG acquisition is a must, with simulation files!
Date selection of hotel check-in time and check-out time
ERP管理系统的重要性
How to select an oscilloscope? These 10 points must be considered!
解答01:Smith圆为什么能“上感下容 左串右并”?
官方零基础入门 Jetpack Compose 的中文课程来啦
Answer 02: why can Smith circle "allow left string and right parallel"?
10分钟后性能测试瓶颈调优!想进大厂这个必须会
Codeforces Round #620 (Div. 2)ABC
Talk about the difference between redis cache penetration and cache breakdown, and the avalanche effect caused by them
Case analysis of camera power supply disturbed, seriously affecting image quality
图扑软件以轻量化建模构建智慧城市
hands-on-data-analysis 第二单元 第四节数据可视化
你的PCB地线走的对吗?为什么要有主地?
MySQL - reasons for using repeatable read
MySQL事务及其特性与锁机制
记录——kubeadm集群node节点加入
The Google play academy team PK competition is in full swing!
解答02:Smith圆为什么能“上感下容 左串右并”?
Can the asemi fast recovery diodes RS1M, us1m and US1G be replaced with each other