I'm trying to write a regular expression to match a requirement ID which consists of alphanumeric character and then a '-' and this can occur one or multitple times.
The example string would be:
NXOS-ABCD-005-053 – Requirement No. 1
F56156-ISSU-1 - Requirement No 1
I tried the regex below using regex 101 website but could not get the appropriate result that i would require.
([A-Za-z0-9]+\-)*
My understanding of using the above regex is ; it will match all characters A-Za-z0-9 multiple times , followed by a - and this combination can occur one or more times.
But It gives me logs of groups which i dont anticipate. can i get some help to fine tune the regex as I tried to google a lot but bot confused with various usages. Any help towards this will be much appreciated.
Thank you in advance.