SyntaxFix
Write A Post
Hire A Developer
Questions
You almost have it, you just left out 0 and forgot the quantifier.
word.matches("^[0-9,;]+$")