Google Sheets: REGEXEXTRACT Formula to remove characters not inside [brackets] but leave , commas?

by Oneezy   Last Updated March 09, 2018 19:03 PM - source

I'm trying to create a formula that uses either =REGEXEXTRACT or =REGEXREPLACE to remove all characters not inside [brackets] but leaving the ,,, commas where they are.

For example...

➜ Text to Regex:

Checkbox 1, Checkbox 2, Checkbox 3[checked], Checkbox 4[disabled]

✔ Expected Result:

, , checked, disabled

My broken formula so far is...

=REGEXEXTRACT (J2, "\[([A-Za-z]+)\]")

✖ Current Result:


Does anyone know the correct way to achieve this?

Related Questions

Google Sheets REGEX Challange

Updated December 29, 2017 13:03 PM