3 ms·
Adding to that, I'm often bitten trying to search for user strings because they're split across lines to adhere to 80 characters. So if I'm trying to locate th
by crazygringo 2y ago
Adding to that, I'm often bitten trying to search for user strings because they're split across lines to adhere to 80 characters.
So if I'm trying to locate the error message "because the disk is full" but it's in the code as:
... + " because the " +
"disk is full")
then it will fail.
So really, combining both our use cases, what would be great is to simply search for a given case-insensitive alphanumeric string in files that skips all non-alphanumeric characters.
So if I search for:
Foobar2
it would match all of:
FooBar2
foo_bar[2]
"Foo " + \
("bar 2")
foo.bar.2
And then in the search results, even if you get some accidental hits, you can be happy knowing that you didn't miss anything.
- lathiat 2y agoThese are both of the problems I regularly have. The first one I immediately saw when reading the title of this submissionw as the "super case insensitive" that I often see when working on Go Codebases particularly when using a combination of Go Classes and YAML or JSON. Also happens with command line arguments being converted to variables. But the string split thing you mentioned happens a lot when searching for OpenStack error messages in Python that is often split across lines like you showed. My current solution is to randomly shift what I'm searching for, or try pick the most unique line.