Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you do a case insensitive search using a pattern modifier using less?

It seems like the only way to do this is to pass the -i parameter in when you initially run less. Does anyone know of some secret hack to make something like this work

/something to search for/i 
like image 668
mk. Avatar asked Aug 19 '08 20:08

mk.


People also ask

How do you make a case-insensitive search?

Case insensitive SQL SELECT: Use upper or lower functions or this: select * from users where lower(first_name) = 'fred'; As you can see, the pattern is to make the field you're searching into uppercase or lowercase, and then make your search string also be uppercase or lowercase to match the SQL function you've used.

How do you make a search case-insensitive in Vim?

You can use in your vimrc those commands: set ignorecase - All your searches will be case insensitive. set smartcase - Your search will be case sensitive if it contains an uppercase letter.

How do you use case-insensitive in Find command?

If you want the search for a word or phrase to be case insensitive, use the -iname option with the find command. It is the case insensitive version of the -name command. If find doesn't locate any files matching your criteria, it produces no output.


1 Answers

You can also type command -I while less is running. It toggles case sensitivity for searches.

like image 59
Juha Syrjälä Avatar answered Sep 21 '22 08:09

Juha Syrjälä