Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find certain texts containing "[" #49

Closed
GoogleCodeExporter opened this issue Nov 29, 2015 · 9 comments
Closed

Cannot find certain texts containing "[" #49

GoogleCodeExporter opened this issue Nov 29, 2015 · 9 comments

Comments

@GoogleCodeExporter
Copy link

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
Copy link
Author

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
Copy link
Author

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

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

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

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

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
Copy link
Author

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
Copy link
Author

Perhaps try grep -F if not using regular expression?

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

@GoogleCodeExporter
Copy link
Author

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
Copy link
Author

Confirmed! You are welcome.

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

@GoogleCodeExporter
Copy link
Author

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

  • Changed state: Verified

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant