I am trying to find if a string fits the format "name"/"version"
. Here is an example of what I expect to have.
VideoPart/1.2
I've tried many regexes. The closest I have come is this:
"[a-z,A-Z,0-9,\\.]*/[a-z,A-Z,0-9,\\.]"
but it doesn't recognize the format. I am being specific in this regex because I don't want anything more than just one forward-slash. Thanks!
*
.or
's. The text can be any combination of those.[a-z,A-Z,0-9,\\.]
is the same as[a-zA-Z0-9,.]
. You don't have to escape periods inside character classes.[a-zA-Z0-9\.]*
is the same thing. Also you may want to use+
instead of*
otherwise you could match single forward-slashes