From 16137f1dd5390a2321b5597c3a820dee45c10526 Mon Sep 17 00:00:00 2001 From: Lars Amsel Date: Tue, 13 Jul 2021 11:34:53 +0200 Subject: rfnoc: fix block id check to allow underscore We allow underscore in RFNoC's block names but the regular expressions only allowed the underscore in the block name RE. This fix adds the underscore to the block id RE as well as adapts the unit tests accordingly. --- host/include/uhd/rfnoc/constants.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'host/include') diff --git a/host/include/uhd/rfnoc/constants.hpp b/host/include/uhd/rfnoc/constants.hpp index e059a5215..68833430c 100644 --- a/host/include/uhd/rfnoc/constants.hpp +++ b/host/include/uhd/rfnoc/constants.hpp @@ -90,6 +90,6 @@ static const size_t MAX_NUM_PORTS = 16; // Regular expressions static const std::string VALID_BLOCKNAME_REGEX = "[A-Za-z][A-Za-z0-9_]*"; static const std::string VALID_BLOCKID_REGEX = - "(?:(\\d+)(?:/))?([A-Za-z][A-Za-z0-9]*)(?:(?:#)(\\d\\d?))?"; + "(?:(\\d+)(?:/))?([A-Za-z][A-Za-z0-9_]*)(?:(?:#)(\\d\\d?))?"; }} /* namespace uhd::rfnoc */ -- cgit v1.2.3