Skip to content

Commit 2ca390c

Browse files
committed
Add comment with example strings matched or not by regex
As suggested in code review.
1 parent a80fe1f commit 2ca390c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/solvers/smt2_incremental/smt_terms.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ bool smt_bool_literal_termt::value() const
5050

5151
static bool is_valid_smt_identifier(irep_idt identifier)
5252
{
53+
// The below regex matches a complete string which does not contain the `|`
54+
// character. So it would match the string `foo bar`, but not `|foo bar|`.
5355
static const std::regex valid{R"(^[^\|]*$)"};
5456
return std::regex_match(id2string(identifier), valid);
5557
}

0 commit comments

Comments
 (0)