3 ms·
Just to elaborate a little on my quick callout. Doing line oriented searches actually requires you to look at every character, if only to find all the line bre
by taeric 8y ago
Just to elaborate a little on my quick callout. Doing line oriented searches actually requires you to look at every character, if only to find all the line breaks.
Instead, treat the file as a collection of characters and just look for patterns. Which may include the line break character.
That make sense?
Edit: I should also add that you should look for burntsushi's posts. Turns out some of this had become out of date. And largely depends on size of what you are searching.