A
A
Alex2018-02-25 18:07:59
Java
Alex, 2018-02-25 18:07:59

What does the given regular expression mean?

The matches() method checks a string with a given regular expression. Can't figure out what it means?
if(!number.matches("[-+]?\\d+")) {

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
SagePtr, 2018-02-25
@cocaine4ik

From one or more numbers (0-9), which may or may not be preceded by either a plus or a minus.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question