Java, JavaScript, and shell tools use regex engines with different syntax and escaping rules. Check matching, nonmatching, empty, and long inputs in the actual engine.
Do not paste secrets or real customer data into external practice sites.
^[0-9]+$ Entire string containing only digits
[^0-9] One non-digit character
(?:cat|dog) Non-capturing group
A negated character class specifies what to exclude, for example [^0-9]. Distinguish full-input validation from substring search.