diff --git a/frontend/src/component/project/Project/ProjectForm/FeatureFlagNamingTooltip.tsx b/frontend/src/component/project/Project/ProjectForm/FeatureFlagNamingTooltip.tsx index 81edeb5f5e..0c2b463d9a 100644 --- a/frontend/src/component/project/Project/ProjectForm/FeatureFlagNamingTooltip.tsx +++ b/frontend/src/component/project/Project/ProjectForm/FeatureFlagNamingTooltip.tsx @@ -3,162 +3,16 @@ import { FC } from 'react'; import { HelpIcon } from 'component/common/HelpIcon/HelpIcon'; export const FeatureFlagNamingTooltip: FC = () => { - const X = 'X'; - const nx = 'n{X,}'; - const nxy = 'n{X,Y}'; return ( -

Enforce a naming convention for feature flags

-
-

{`eg. [A-Za-z0-9]{2}[.][a-z]{4,12} matches 'a1.project'`}

-
-

Brackets:

- - - - - - - - - - - - - - - - - - - - - - - -
[abc]Match a single character a, b, or c
[^abc] - Match any character except a, b, or c -
[A-Za-z] - Match any character from uppercase A to - lowercase z -
(ab|cd|ef)Match either ab, cd, or ef
(...)Capture anything enclosed
-

Metacharacters

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
^Start of line
$End of line
.Match any character
\wMatch a word chracter
\WMatch a non-word character
\dMatch a digit
\DMatch any non-digit character
\sMatch a whitespace character
\SMatch a non-whitespace character
\b - Match character at the beginning or end - of a word -
\B - Match a character not at beginning or - end of a word -
\0Match a NUL character
\tMatch a tab character
\xxx - Match a character specified by octal - number xxx -
\xdd - Match a character specified by - hexadecimal number dd -
\uxxxx - Match a Unicode character specified by - hexadecimal number xxxx -
-

Quantifiers

- - - - - - - - - - - - - - - - - - - - - - - - - - - -
n+Match at least one n
n*Match zero or more n's
n?Match zero or one n
n{X}Match sequence of X n's
{nxy}Match sequence of X to Y n's
{nx}Match sequence of X or more n's
-
+

+ For example, the pattern{' '} + {'[a-z0-9]{2}\\.[a-z]{4,12}'} matches + 'a1.project', but not 'a1.project.feature-1'. +

} /> diff --git a/frontend/src/component/project/Project/ProjectForm/ProjectForm.tsx b/frontend/src/component/project/Project/ProjectForm/ProjectForm.tsx index e481572d4c..d153d8e771 100644 --- a/frontend/src/component/project/Project/ProjectForm/ProjectForm.tsx +++ b/frontend/src/component/project/Project/ProjectForm/ProjectForm.tsx @@ -352,7 +352,7 @@ const ProjectForm: React.FC = ({

Define a{' '}