physu
physu

Reputation: 169

searching for strings containing special characters in vim

How can I search for the following string in vim:

\$5 * \$5 * \$6 * 10000

Just typing

/\$5 * \$5 * \$6 * 10000

in command mode doesn't do the job.

Thanks

Upvotes: 1

Views: 1320

Answers (1)

Nicky McCurdy
Nicky McCurdy

Reputation: 19524

Put a \ before \ (double \\), $, and *.

/\\\$5 \* \\\$5 \* \\\$6 \* 1000\\\$5 \* \\\$5 \* \\\$6 \* 10000

Upvotes: 1

Related Questions