Open ido123net opened 3 months ago
PR would be great!
OK @ido123net i can see why the original developer only did "Knuth–Morris–Pratt" string matching for search. Say you have a very large log file this string searching is way faster and more efficient than an expensive RegExp search.
Yes, I also found it, I will try to leave the KMP part as is.
My idea is to implement a new function to search with regex, this will of-course be less efficient, therefore it will not be the default.
I just committed some JS doc changes to document that class just so I know why it was doing it!
@melloware look at #40 it works, but it breaks the highlights and filtering lines.
I just committed some JS doc changes to document that class just so I know why it was doing it!
I saw, I pulled the latest 😉
Yep I can point you to wheee the highlighting is happening and why it's not working. Let me review
OK the bug is in here: https://github.com/melloware/react-logviewer/blob/3646bca8a1b8886ed2da8dacc42b9e83d49ba322/src/components/Utils/utils.ts#L135-L231
It does some magic tro remove regex strings and do a plain text match on highlighted words.
Feature Request:
Please add regex search functionality to
react-logviewer
. This would enable more flexible and powerful search options, allowing users to match complex patterns in logs.I'd be glad to help with a PR if needed! 😊 Keep in mind I'm new to the React world.
Thank you!