"use strict" let myRe = /\s\S+(?=\s)/g; let str = 'exit test some'; myRe.exec(str); let value = myRe.lastIndex; alert(value);