如何使用正则表达式在“[]”中获取值?

How to get value inside '[]' using regex?

**嗨,我写了正则表达式。在这里我只想要 select 值 insdie **

[buttonRouter, CheckBoxModule, RadioButtonModule, DropDownButtonModule, SplitButtonModule, SwitchModule, SharedModule, ProgressButtonModule]

而不是这个 select

imports: [buttonRouter, CheckBoxModule, RadioButtonModule, DropDownButtonModule, SplitButtonModule, SwitchModule, SharedModule, ProgressButtonModule]

我的要求,正则表达式必须 select 值仅在 导入:[值]

这个正则表达式应该 return 只有 return 值部分但仍然寻找 "imports: ":

(?<!:imports: )\[.+\]