Skip to content

Commit

Permalink
Refs #20608: Fix regex pattern
Browse files Browse the repository at this point in the history
Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
  • Loading branch information
Mario-DL committed Mar 13, 2024
1 parent f6325d5 commit d4f591b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cpp/utils/UnitsParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ uint32_t parse_value_and_units(

to_uppercase(units);

std::regex pattern(R"(([kibmgKIBMG]{1,3})|(\d+))");
std::regex pattern(R"(([bB]{1})|([kibmgKIBMG]{2,3})|(\d+))");
if (!std::regex_match(units, pattern))
{
throw std::invalid_argument(
Expand Down

0 comments on commit d4f591b

Please sign in to comment.