Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Finding text, excluding supersets in Sublime

I remember hearing about the option to search for an exact word in Sublime, but I can't seem to find it.

What I mean by this is if I search for write, I'd like to exclude all instances of foo_write, foowrite, etc.

How can this be done?

like image 733
Daniel Que Avatar asked Mar 11 '14 23:03

Daniel Que


1 Answers

Hit CtrlF (Win/Lin) or CmdF (OS X) to open up the Find tab. Make sure the first button on the left (Regular Expressions) is selected. In the search field, enter \bfoo\b and click the Find button or hit CtrlG/CmdG to search. The \b token indicates a word boundary, including spaces, punctuation marks like commas, periods/full stops, question marks, etc.

like image 84
MattDMo Avatar answered Nov 10 '22 09:11

MattDMo