I'm fairly new to Regex, but not new to Java as a coding language. I'm currently trying to create a Regex expression that will format a user's input to two separate values, but I'm a little curious as to how to approach it.
For example, suppose a user were guessing the resulting score of a basketball game, there's a handful of formats they could use:
57-89
57:89
57/89
etc.
I guess my question is first, how would I go about having my Regex expression handle multiple digits? That is, recognizing a valid guess regardless of how many digits they were to put in for each value. Second of all, how would I go about creating a Regex expression that would handle multiple formats, such as the ones listed above?
Thanks ahead of time.