I was working with some text the other day which included a lot of references using numbers in square brackets; I needed to remove this text and wanted an easy way of doing it.
I did a little research and found that Notepad++, an application I already use, can do regular expression find and replace.
The regular expression for a number surrounded by square brackets is:
\[(\d+)\]
To use the regular expression in find and replace, enter the regular expression into the Find what box and change the Search Mode to Regular expression:
When you hit Replace, or Replace All, the regular expression will be used to repalce the matching text with the supplied replacement value.
What should we write about next?
If there is a topic which fits the typical ones of this site, which you would like to see me write about, please use the form, below, to submit your idea.
Thank you, this regex did exactly what I needed in OpenOffice Writer.