Toggle navigation
Genres
Frontend (2)
JavaScript (6)
Database (2)
Linux Server (3)
Web Apps (4)
Misc (4)
Search
List
New Tutorials
Last Modified Tutorials
</>
Code examples
code
smiko
javascript
basic
035stringmethods_match_memory.js
035stringmethods_match_memory.js
/** * String methods: match * The example shows usage of regex memory e.g. () */ var str, x; str = "SOME simple Sample string"; //regex memory is inside (). Memory is returned as array element x = str.match(/sim(\w+)/i); //case sensitive console.log(x); // [ 'simple', 'ple', index: 5, input: 'SOME simple Sample string' ] console.log(x[1]); // $1 = ple
Reload page
Preview
W3C validation
Edit Code
JS Console