Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
feat: add regex and case sensitive to
FindReplaceMenu
#480feat: add regex and case sensitive to
FindReplaceMenu
#480Changes from 19 commits
c2fa26a
6b91334
601b961
4bedca4
bba13d2
6e67ced
40845a0
666f63d
e9121b9
2fcbcad
44db679
20bd13a
58e7565
2d0d693
a342d98
9b2b2b0
d7e84a2
77b3f5f
708eac3
4b9bd28
e324d5c
2caa385
e110509
ff06b7d
ab9f7b5
4181f00
addea23
7cab003
7fd4d49
476888a
90368cd
d507155
d1ea4ab
16af1c3
97f067d
21f83fa
ee39de2
4701db3
d35c4e8
0a53503
8c69ea6
ac34ee2
e0f3921
484fd67
4a206b1
44033f2
cf9a2d4
4574659
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Check warning on line 137 in lib/src/editor/find_replace_menu/find_replace_widget.dart
lib/src/editor/find_replace_menu/find_replace_widget.dart#L135-L137
Check warning on line 139 in lib/src/editor/find_replace_menu/find_replace_widget.dart
lib/src/editor/find_replace_menu/find_replace_widget.dart#L139
Check warning on line 154 in lib/src/editor/find_replace_menu/find_replace_widget.dart
lib/src/editor/find_replace_menu/find_replace_widget.dart#L152-L154
Check warning on line 156 in lib/src/editor/find_replace_menu/find_replace_widget.dart
lib/src/editor/find_replace_menu/find_replace_widget.dart#L156
Check warning on line 30 in lib/src/editor/find_replace_menu/search_algorithm.dart
lib/src/editor/find_replace_menu/search_algorithm.dart#L29-L30
Check warning on line 32 in lib/src/editor/find_replace_menu/search_algorithm.dart
lib/src/editor/find_replace_menu/search_algorithm.dart#L32
Check warning on line 35 in lib/src/editor/find_replace_menu/search_algorithm.dart
lib/src/editor/find_replace_menu/search_algorithm.dart#L34-L35
Check warning on line 37 in lib/src/editor/find_replace_menu/search_algorithm.dart
lib/src/editor/find_replace_menu/search_algorithm.dart#L37
Check warning on line 41 in lib/src/editor/find_replace_menu/search_algorithm.dart
lib/src/editor/find_replace_menu/search_algorithm.dart#L40-L41
Check warning on line 53 in lib/src/editor/find_replace_menu/search_algorithm.dart
lib/src/editor/find_replace_menu/search_algorithm.dart#L53
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sun-jiao @Xazin, do we need to create a Mixture class?
If
DartBuiltin
works in all cases, we should just use that, since it is faster.And keep
BoyerMoore
as an example for the developer if they want to implement their own algorithm.Also then, we could remove the
BoyerMoore
implementation from the code and only show it in Docs as an example.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My tests showed BoyerMoore to be slightly slower. But auto-generated random strings were used in my tests.
I think BoyerMoore should be more efficient for natural language. Because most languages that use alphabetic scripts have prefixes and suffixes that are shared between different words.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have read some articles or papers on Boyer-Moore style regex search algorithm. But they're not as concise as the original Boyer-Moore.
Rust community also has a similar issue. rust-lang/regex#197
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They have already implemented it: rust-lang/regex#419. I'll take a look tomorrow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took a brief look and this still seems to be a plain text search algorithm, not regex. Even though it's in the regex carte.