1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

1-1360: explain implicit ^ and $ in docs (#4668)

Update docs to explain that ^ and $ are implicit in the regexes used.
This commit is contained in:
Thomas Heartman 2023-09-12 14:23:19 +02:00 committed by GitHub
parent 4dcbb4b997
commit 44db4fb0c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,7 +8,11 @@ Feature flag naming patterns is an in-development, **enterprise-only** feature.
::: :::
A feature flag naming pattern is [JavaScript regular expression](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) that is used to validate the name of a feature flag before the flag can be created. The pattern is defined in the project settings and is enforced when creating a new feature flag. The pattern is also enforced when creating a new feature flag via the API. A feature flag naming pattern is [JavaScript regular expression](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) that is used to validate the name of a feature flag before the flag can be created.
The pattern is defined in the project settings and is enforced when creating a new feature flag. The pattern is also enforced when creating a new feature flag via the API.
Patterns are implicitly anchored to the start and end of the string. This means that a pattern is matched against the entire new feature flag name, and not just any subset of it, as if the pattern was surrounded by `^` and `$`. In other words, the pattern `[a-z]+` will be interpreted as `^[a-z]+$` and will match "somefeature", but will not match "some.other.feature".
Feature flag naming patterns are defined on a per-project basis. Feature flag naming patterns are defined on a per-project basis.