I have a Calc spreadsheet which I copied and pasted from Wikipedia. It has a bunch of citation links in the form of "[num]". Something like "some data I want to keep [1] [12]".
How do I use Find and Replace (CTRL+H) to replace everything that starts with a "[" and ends in a "]" with a "wildcard" or any integer between them?
I've tried the: Other options > Wildcards check box, using "." as any character wildcard, but that doesn't work.
Any assistance would be very much appreciated.
Open the Search-and-replace dialog and check "Regular expressions". Then search for
\[\d+\]
. This will search for the literal[
, followed by one or more digits (\d
), followed by the literal]
.The backslashes are necessary to escape the
[
and]
which would otherwise be interpreted as part of the regular expression.