joannesguillemot / advanced-find

Automatically exported from code.google.com/p/advanced-find
0 stars 0 forks source link

Cannot find certain texts containing "[" #49

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Not using Regular expression
2. Search all documents in directory
3. Directory include sub-folder
4. Use filter like "*.rb"
4. Search for certain texts that are directly copied from the files opened in 
Gedit (ie, these texts do exist!):

params[:url]
ms[:url]
ams[:url]
t => [
=> [
> [
 [
[

What is the expected output? What do you see instead?
Should return list of matching results. Instead, "0 hits in 0 files".

What version of the product are you using? On what operating system?
3.3.2 on ArchLinux with kernel 3.1.8-1, Gedit 3.2.6.

Please provide any additional information below.
However, the search for other related patterns did succeed:
[:url]
s[:url]
t => 

Original issue reported on code.google.com by n...@gust.com on 13 Jan 2012 at 5:40

GoogleCodeExporter commented 8 years ago
Sorry the version of this plugin is at 3.3.3

Original comment by n...@gust.com on 13 Jan 2012 at 5:40

GoogleCodeExporter commented 8 years ago
Thanks for your replying.

It uses the grep command to speed up the searching in directory function.
grep treat patterns as regular expressions even you don't check that.
[ and $ are both key characters of regular expression and make your pattern a 
bad regex pattern.
That's why searching in directory function found nothing.

I will try to fix this.

Original comment by swatch.c...@gmail.com on 14 Jan 2012 at 3:49

GoogleCodeExporter commented 8 years ago
Fix at v3.3.4.
Please try it again.

The solution is ugly, and I think the problem is not solved completely.
My suggestion is using the function carefully when searching non-alphanumeric 
characters.

Please let me know if there are any problem.
Any suggestion or idea is welcome.

Original comment by swatch.c...@gmail.com on 15 Jan 2012 at 7:12

GoogleCodeExporter commented 8 years ago
No, 3.3.4 still cannot find some of the patterns:

t => [
=> [

And issue 48 also broke.

Original comment by n...@gust.com on 17 Jan 2012 at 12:07

GoogleCodeExporter commented 8 years ago
Thanks for testing and replying

As I post before, the problem is about grep.
Any idea how to search the patterns that you listed with grep command?

Or I can just stop using grep, but that will make the function much slower.

Original comment by swatch.c...@gmail.com on 17 Jan 2012 at 3:22

GoogleCodeExporter commented 8 years ago
Perhaps try grep -F if not using regular expression?

Original comment by n...@gust.com on 17 Jan 2012 at 7:34

GoogleCodeExporter commented 8 years ago
Try v3.3.5.
I think the problem is solved.
Thanks for your advice.

Original comment by swatch.c...@gmail.com on 17 Jan 2012 at 11:54

GoogleCodeExporter commented 8 years ago
Confirmed! You are welcome.

Original comment by n...@gust.com on 18 Jan 2012 at 5:12

GoogleCodeExporter commented 8 years ago

Original comment by swatch.c...@gmail.com on 18 Jan 2012 at 11:37