i'm new and still learning java, i was wondering i'm trying to limit a certain set of alphabets in a string field. For example, i'm having someone to input something, like a "this team vs that team" into a "team - team"
so when someone inputs it, i just want to limit only one "-" . So if he tries to put more than one - , the procedure doesnt work. But only limits to allow one " - " how do i do that?