Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

find a word in string javascript

const string = "This is a very long string";
const match = string.match(/very/);
console.log(match) // ['very', index: 10, input: 'This is a very long string', groups: undefined]
 
PREVIOUS NEXT
Tagged: #find #word #string #javascript
ADD COMMENT
Topic
Name
2+1 =