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

/e: Set RZ_REGEX_MULTILINE for ^ and $ #4868

Merged
merged 4 commits into from
Jan 29, 2025

Conversation

kazarmy
Copy link
Member

@kazarmy kazarmy commented Jan 29, 2025

Your checklist for this pull request

  • I've read the guidelines for contributing to this repository.
  • I made sure to follow the project's coding style.
  • I've documented every RZ_API function and struct this PR changes.
  • I've added tests that prove my changes are effective (required for changes to RZ_API).
  • I've updated the Rizin book with the relevant information (if needed).

Detailed description

This pr sets RZ_REGEX_MULTILINE for the /e regex search so that ^ and $ can match the beginning and end respectively of a C string. For ^, there is probably the assumption that the string is at the beginning of the searched area or has a \0 before it.

Test plan

All builds are green.

Closing issues

...

Copy link
Member

@Rot127 Rot127 left a comment

Choose a reason for hiding this comment

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

lgtm, but please document this in the /e command. It is not obvious to the user and I might forget it when I refactor it later this week.

@kazarmy
Copy link
Member Author

kazarmy commented Jan 29, 2025

@Rot127 Is d5e95a5 ok?

librz/core/cmd/cmd_search.c Outdated Show resolved Hide resolved
@kazarmy kazarmy merged commit 303b39e into rizinorg:dev Jan 29, 2025
46 checks passed
tushar3q34 pushed a commit to tushar3q34/rizin that referenced this pull request Feb 2, 2025
* `/e`: Set `RZ_REGEX_MULTILINE` for `^` and `$`
* Add note in `/e` help for `^` and `$`

Co-authored-by: Rot127 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants