I need to validate that strings has the following pattern:
component/1.2/text
component/1.2.3/othertext
component/1.2.32/text
component/10.21.32/yetanothertext
So always contains two path separators, starts with component followed by major.minor or major.minor.bug and ends with some text.
Any suggestion for a regular expression that can be used to discard anything NOT following the above pattern, e.g.:
component/4/base
comp/4/samples
...

/^component\/\d+(?:\.\d+){1,2}\/\w+$/... regex101.com/r/aE8cP4/1