Skip to content

Conversation

lewis-wow
Copy link
Contributor

@lewis-wow lewis-wow commented Sep 11, 2025

This PR introduces a new utility function, createInjectableRegExp(), that converts any regex into an "injectable" version by removing its leading ^ and trailing $ anchors.

This is useful when you need to embed an existing pattern, which was originally designed to match a whole string, inside another regex to match it as a substring.

Thanks to this, we can replace APIFY_PROXY_VALUE_REGEX with REGEX_STR_USERNAME_VALUE in Apify proxy and solve this issue https://github.com/apify/apify-proxy/issues/1079.

The function was created in Apify shared repo, so it can be used in other places.

@github-actions github-actions bot added t-core-services Issues with this label are in the ownership of the core services team. tested Temporary label used only programatically for some analytics. labels Sep 11, 2025
@lewis-wow lewis-wow requested a review from fnesveda September 11, 2025 11:56
@lewis-wow lewis-wow added the adhoc Ad-hoc unplanned task added during the sprint. label Sep 11, 2025
@lewis-wow lewis-wow merged commit 598952e into master Sep 15, 2025
9 checks passed
@lewis-wow lewis-wow deleted the feat/create-injectable-regexp branch September 15, 2025 08:13
@tobice tobice added the validated Issues that are resolved and their solutions fulfill the acceptance criteria. label Sep 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adhoc Ad-hoc unplanned task added during the sprint. t-core-services Issues with this label are in the ownership of the core services team. tested Temporary label used only programatically for some analytics. validated Issues that are resolved and their solutions fulfill the acceptance criteria.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants