比如說,我想匹配
<a>1234</a>567我需要的89
之中的“我需要的”四個字,應該用什么正則呢?
uj5u.com熱心網友回復:
如果是僅僅需要匹配“我需要的”,只需要正則:/我需要的/,就可以了uj5u.com熱心網友回復:
<script>let str = '<a>1234</a>567我需要的89'
let reg = /我需要的/
console.log(reg.test(str)) //---------true
</script>
轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/132302.html
標籤:HTML(CSS)
