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

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

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

REGEXEXTRACT and French accents in Google Spreadsheets

Updated October 01, 2017 06:03 AM

Is there a RegEx-Text-Extraction-as-a-service?

Updated January 12, 2018 21:03 PM