Skip to content

Support FullMatch on pre-compiled Regex in regex wrapper - #75

Open
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_967070596
Open

Support FullMatch on pre-compiled Regex in regex wrapper#75
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_967070596

Conversation

@copybara-service

Copy link
Copy Markdown

Support FullMatch on pre-compiled Regex in regex wrapper

Add support for calling FullMatch and FullMatchN with pre-compiled const Regex& objects in //security/regex.

  • In regex.h, implement FullMatchN and FullMatch(absl::string_view, const Regex&, Args&&...) by matching the full span (Start() == 0 && End() == text.size()) of the pre-compiled regex without requiring recompilation.
  • Clean up single-letter variable names across template matching functions.
  • Add unit tests verifying FullMatch on pre-compiled Regex objects with and without capture group extractions and numeric parsing.

Add support for calling `FullMatch` and `FullMatchN` with pre-compiled `const Regex&` objects in `//security/regex`.

- In `regex.h`, implement `FullMatchN` and `FullMatch(absl::string_view, const Regex&, Args&&...)` by matching the full span (`Start() == 0 && End() == text.size()`) of the pre-compiled regex without requiring recompilation.
- Clean up single-letter variable names across template matching functions.
- Add unit tests verifying `FullMatch` on pre-compiled `Regex` objects with and without capture group extractions and numeric parsing.

PiperOrigin-RevId: 967070596
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.

1 participant