Hello, I have a string which a user should input into my program. And I wanna check if the string always has the correct format. What is the best way to check this Format in java ? [One digit 0-9];[Hex code like 0x21DE40AF];[Digit 0-99];[One Digit 0-9] Thanks
sorry ^^ don't see "java" ... but search for "regex" - regular expression
if i'm not completely wrong there's something like String.match(pattern) which uses regex. and regex absolutely suitable for this task
Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.