Hello everyone, the problem is as follows: when using the pattern in the matches () method, in error it shows the last character
if(scanLine.matches( "^((LABEL ([az]([[az]|[\\d])|\\d{0,4}))(, ([az]([[az]|[\\d])|\\d{0,4}))*)$")) System.out.println("Строка записана правильно"); 
(, -> (\,,. - user194374