How to extract a string inside square brackets using regexextract function in google sheets

preview_player
Показать описание
@redtailfanschool In this video I demonstrate how to extract the string of data inside square brackets [this text]. This kind of text is in the headers of the spreadsheet from using the multiple choice grid or checkbox grid question type on a google form. I often want to use the strings inside the brackets, and I do not want o manually clean it up! So we use a regexextract formula inside an array formula to accomplish this.
=ArrayFormula(IF(LEN(A1:A),REGEXEXTRACT(A1:A,$E$1),)) where E1 has the regular expression - \[(.+)\]
Рекомендации по теме
Комментарии
Автор

Hello! First of all, thank you for this video, it really helped me! I have a question though: what about specific strings in the range you're looking for? I.e.: "Sweets [candy, cookie]", and you want to check for each of those words individually? I tried "*\[*cookie*\]" but it doesn't work. Thanks again for the video!

karvo
join shbcf.ru