Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 5298

Any operation involving regular expression based substitution of text, such as the ex-mode `:s` command. Not to be confused with the [replace] tag.

2 votes

Special search and replace

You need to escape the brackets, as they are special characters used to indicate a list in a substitution. Your command should be :%s/array\[j\]/array/g
Herb's user avatar
  • 1,213
13 votes
Accepted

Find and replace all numbers with 0?

Based on the help file, and the Vim Wikia page on Search and replace :%s/[0-9]\+\.[0-9]\+\|[0-9]\+/0/g :%s - start a command with the range of the entire file, %, to substitute, the following patterns …
Herb's user avatar
  • 1,213