JakubHJ
Reactiflux4y ago
7 replies
JakubH

✅ – venus – 12-02 Oct 9

Looking for possible regex solution, since I still suck at it. The goal of the regex is to validate if string fits the format.
First should be random length string, then comes colon (
:
) and the last is one of two options:
desc
or
asc
.

someString:desc|asc

Examples:
firstName:desc
,
lastName:asc
Was this page helpful?