Ignore spaces when searching
-
- Posts: 192
- Joined: Fri Nov 28, 2014 3:58 pm
Ignore spaces when searching
As an example, if there is a file named "Hello John.mp4" and I type in the search "HelloJohn" it will not find the file, only if I type "Hello John". Is there a way to still find the file even if there is spaces in between the search?
Re: Ignore spaces when searching
There are no spaces in your search, "hellojohn", so how can it "ignore" them?
If you're not sure if the file name is "hello john" or "hellojohn", why don't you just type hello<space>john (without quotes) as your search & that would find both instances (as well as others - such as: "hello you yellow rabbit named, john, how have you been.mp4").
If you're not sure if the file name is "hello john" or "hellojohn", why don't you just type hello<space>john (without quotes) as your search & that would find both instances (as well as others - such as: "hello you yellow rabbit named, john, how have you been.mp4").
-
- Posts: 192
- Joined: Fri Nov 28, 2014 3:58 pm
Re: Ignore spaces when searching
Misworded my original question, but your way probably makes the most sense. Thanks.
Re: Ignore spaces when searching
An "Ignore Punctuation" option has been implemented for the next version of Everything, when enabled, this will let you search for hellojohn, which will match hello john
Currently, with Everything 1.4 you will need to use a space to split the search terms up as therube mentions above.
Currently, with Everything 1.4 you will need to use a space to split the search terms up as therube mentions above.
Re: Ignore spaces when searching
How is that intended to work?
Something like: 'h e l l o j o h n', in that order?
Or in any order?
Or something like x-number of chars is a "sliding window"?
So, "hel" "ell" "llo" "loj" "ojo" "joh" "ohn"?
Something like: 'h e l l o j o h n', in that order?
Or in any order?
Or something like x-number of chars is a "sliding window"?
So, "hel" "ell" "llo" "loj" "ojo" "joh" "ohn"?
Re: Ignore spaces when searching
basically spaces and punctuation are removed from the filename and search before the comparison.
hello john.txt is converted to hellojohntxt
Characters will have to match in the correct order.
"Ignore punctuaction" will be off by default, as I've found searching for punctuaction more useful than ignoring it.
hello john.txt is converted to hellojohntxt
Characters will have to match in the correct order.
"Ignore punctuaction" will be off by default, as I've found searching for punctuaction more useful than ignoring it.
Re: Ignore spaces when searching
OK, that I understand, that's a simple s/[ '."]//g, kind of thing (& along the same lines as, viewtopic.php?p=21685#p21685).
But is that what the OP is asking, or is he wanting the opposite?
But is that what the OP is asking, or is he wanting the opposite?
Re: Ignore spaces when searching
I believe "Ignore punctuation" is what JTCGiants56 wants.
While "Ignore punctuation" ignores spaces, it would also ignore all punctuation. OP might not want this?
OP wants to search for HelloJohn and have it find Hello John.mp4, which is what the upcoming feature "Ignore punctuation" will allow him to do..
While "Ignore punctuation" ignores spaces, it would also ignore all punctuation. OP might not want this?
OP wants to search for HelloJohn and have it find Hello John.mp4, which is what the upcoming feature "Ignore punctuation" will allow him to do..
Re: Ignore spaces when searching
But what I'm not following is if my search is "HelloJohn" how will it know to look for "Hello John" & not "He lloJohn" or "Hellojo hn", or will it find all of them?
Or are the capitalized letters (or similar) intended to demark "words" between which "punctuation" can appear between?
Or are the capitalized letters (or similar) intended to demark "words" between which "punctuation" can appear between?
Re: Ignore spaces when searching
It will find all of them, basically spaces are removed from the search and the filenames.
Re: Ignore spaces when searching
Ah, OK, I got you now.
So I type in a search
> iwanttosearchforthis
And it finds:
> i want to read 100 books this year, and i want to search for this based on specific criteria
But it does not find:
> i want to read 100 books this year, would you help me search for topics that meet this criteria
So something like
%s/ //g
followed by
x=pos(searchstring, readln)
if x, 'print' readln
So I type in a search
> iwanttosearchforthis
And it finds:
> i want to read 100 books this year, and i want to search for this based on specific criteria
But it does not find:
> i want to read 100 books this year, would you help me search for topics that meet this criteria
So something like
%s/ //g
followed by
x=pos(searchstring, readln)
if x, 'print' readln
Re: Ignore spaces when searching
Not quite...
iwanttosearchforthis is not found in iwanttoread100booksthisyearandiwanttosearchforthisbasedonspecificcriteria
You would still have to use i*want*to*search*for*this to match your example.
Everything will strip the spaces and punctuation from your filename:> iwanttosearchforthis
And it finds:
> i want to read 100 books this year, and i want to search for this based on specific criteria
iwanttosearchforthis is not found in iwanttoread100booksthisyearandiwanttosearchforthisbasedonspecificcriteria
You would still have to use i*want*to*search*for*this to match your example.