& lt; A> 1234 & lt;/a> I need 567 to 89
"I need" of four word, should use the regular?
CodePudding user response:
If it is just need to match "I need", only need regular://I need, you canCodePudding user response:
<script>Let the STR='& lt; A> 1234 & lt;/a> I need 567, 89 '
Let reg=//I need
The console. The log (reg. Test (STR))//-- -- -- -- -- -- -- -- -- true
</script>