Amazing google Sheets trick

How do you search and replace [*] in Google Sheets so that the brackets and whatever is in the bracket (or parentheses) gets deleted?

You need regular expressions to solve your find and replace the problem. A regular expression pattern is an admittedly arcane character string capable of matching various text patterns with exquisite sensitivity and precision

Google Sheets supports regular expressions in its Find & Replace dialog. You must check the box for “Search using regular expressions” each time you perform such a search. The Find field will be the regular expression pattern \[.*\] and the Replace field should be left blank.

To explain the regular expression pattern,


the backslash means the next character is a literal rather than a regular expression special character. 

The . mean any character.

The * means 0 or more occurrences.


So the regular expression pattern is looking for a left square bracket, 0 or more characters, and a right square bracket.


Thank you Brad Yundt... you Sheets aficionado


No comments:

Post a Comment