Skip to content

Add PCRE support#1143

Merged
koutcher merged 1 commit intojonas:masterfrom
koutcher:gh-1137-pcre
Oct 4, 2021
Merged

Add PCRE support#1143
koutcher merged 1 commit intojonas:masterfrom
koutcher:gh-1137-pcre

Conversation

@koutcher
Copy link
Copy Markdown
Collaborator

@koutcher koutcher commented Sep 9, 2021

Closes #1137

Copy link
Copy Markdown
Owner

@jonas jonas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM


if (*view->grep) {
regfree(view->regex);
*view->grep = 0;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it is more readable to decouple the allocation from regular housekeeping needed when performing a new search.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes and also, maybe I should have mentioned it, PCRE has a slight tendency to segfault when using regfree() on view->regex before regcomp().

@koutcher koutcher merged commit 6f609b1 into jonas:master Oct 4, 2021
@koutcher koutcher deleted the gh-1137-pcre branch February 6, 2025 18:18
@koutcher koutcher restored the gh-1137-pcre branch February 6, 2025 18:36
vxsl pushed a commit to vxsl/tig that referenced this pull request Mar 18, 2026
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

Successfully merging this pull request may close these issues.

Support for pcre2 search pattern?

2 participants