print_r($array['books']);
Array
(
[NAME] => Война и мир
[EMAIL] => ivan@ivan.ru
)
"books" =>[
array("NAME" => "Война и мир",
"EMAIL" => "ivan@ivan.ru"),
array("NAME" => "Зелёная миля",
"EMAIL" => "alexander@al.com"),
array("NAME" => "Путешествие к центру земли",
"EMAIL" => "dima@dm.net"),
]
const x = 10;
const y = 2;
const pattern = new RegExp(`^\\d{0,${x}}(\\.\\d{0,${y}}?)$`, 'g');
console.log(pattern);
/^\d{0,6}(\.\d{0,2})?$/