last-match Return last value from String.match(RegExp) or null Install npm install last-match --save Usage import lastMatch from 'last-match'; console.log(lastMatch('hello world', /o\s*(\w+)/i)); //Output -> world