Home > front end >  How can I use regular matching the front contain a specific string of a string?
How can I use regular matching the front contain a specific string of a string?

Time:10-24

For example, I want to match
 & 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 can

CodePudding 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>
  • Related