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]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #find #word #string #javascript
ADD COMMENT
Topic
Name
1+3 =