Posted at

Javascriptで括弧の中身の文字列を取得するメモ

More than 1 year has passed since last update.


js

let str = "aaa(bbb)ccc";

console.log(str.match(/\((.+)\)/)[1]);