Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

get all matches regex javascript

var re = /s*([^[:]+):"([^"]+)"/g;
var s = '[description:"aoeu" uuid:"123sth"]';
var m;

do {
    m = re.exec(s);
    if (m) {
        console.log(m[1], m[2]);
    }
} while (m);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #matches #regex #javascript
ADD COMMENT
Topic
Name
7+8 =