0

I'm trying to get just a content enclosed in parentheses in a string:

const
  strParentheses = /(?<=\().*?(?=\))/, //but with this regex I get an error using webpack
  string = window.navigator.userAgent;

console.log(strParentheses.exec(string)[0]); 

0 Answers0