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

[Feature request]Regular expression search #407

Closed
wenbopeng opened this issue Sep 6, 2022 · 4 comments
Closed

[Feature request]Regular expression search #407

wenbopeng opened this issue Sep 6, 2022 · 4 comments

Comments

@wenbopeng
Copy link

Using a regular expression literal, which consists of a pattern enclosed between slashes, as follows:
/[a-z]{3}/

@ahrm
Copy link
Owner

ahrm commented Sep 6, 2022

Added a regex_search command in d0af36c. Note that this functionality is disabled by default (because it increases memory usage a little bit). You need to enable it by adding the following to your prefs_user.config (requires a document reload to take effect):

super_fast_search 1

In addition to enabling regular expressions, this also considerably increases normal search speed. For example here we find all 73531 instances of lower case or upper case 'a' in a 730-page document almost instantly.

2022-09-06.17-39-07.mp4

@wenbopeng
Copy link
Author

Added a regex_search command in d0af36c. Note that this functionality is disabled by default (because it increases memory usage a little bit). You need to enable it by adding the following to your prefs_user.config (requires a document reload to take effect):

super_fast_search 1

In addition to enabling regular expressions, this also considerably increases normal search speed. For example here we find all 73531 instances of lower case or upper case 'a' in a 730-page document almost instantly.

1.00
2022-09-06.17-39-07.mp4

awesome!

@ahrm ahrm closed this as completed Sep 8, 2022
@amzon-ex
Copy link

amzon-ex commented Dec 7, 2022

Hi. Is this function not there in the stable release yet?

@ahrm
Copy link
Owner

ahrm commented Dec 7, 2022

No.

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

No branches or pull requests

3 participants