How to search for special characters in Sublime Text 3
15,888
Solution 1
Sublime Text support searching by regex. http://sublime-text-unofficial-documentation.readthedocs.org/en/latest/search_and_replace/search_and_replace_overview.html
You should be able to escape the character with a backslash. "#"
Solution 2
When searching for special characters switch off the regex .* to the left of find box.
Related videos on Youtube
Author by
Zelong
Updated on September 18, 2022Comments
-
Zelong over 1 year
I have a few lines starting with the character
#
and I search for it in SublimeText 3, but ST3 saidunable to find \b#\b
.I then tried to search
\#
and it also fails (with regular expression mode enabled).Other characters such as
& + -
have the same problem.So how could I search for these special characters in ST3?
-
Zelong almost 9 yearsI disable the 'whole word' option then it works. The options seems to fail the RE as well.
-
Toto over 5 yearsNo, that is not true. You have to disable "Whole word" not regular expression.
#
is not a special character for regex.