From 1b592c7f8df783a4f47edbce3f7177769734e008 Mon Sep 17 00:00:00 2001 From: Natalia Date: Wed, 14 Jan 2026 13:21:16 -0800 Subject: [PATCH] Fix TCL regex to use POSIX character classes TCL doesn't support \d and \s escape sequences in regexes. Use [0-9] and [ \t] instead to match digits and whitespace. --- tests/various/test_splitnets.tcl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/various/test_splitnets.tcl b/tests/various/test_splitnets.tcl index cab2e2e69..a2af0f88b 100644 --- a/tests/various/test_splitnets.tcl +++ b/tests/various/test_splitnets.tcl @@ -8,10 +8,10 @@ proc read_stats { file } { set nets 0 foreach line [split $result "\n"] { # Match upstream yosys stat format: " wires" - if [regexp {^\s*(\d+)\s+[\d.]+\s+wires\s*$} $line -> n] { + if [regexp {^[ \t]*([0-9]+)[ \t]+[0-9.]+[ \t]+wires[ \t]*$} $line -> n] { set nets [expr $nets + $n] } - if [regexp {^\s*(\d+)\s+[\d.]+\s+ports\s*$} $line -> n] { + if [regexp {^[ \t]*([0-9]+)[ \t]+[0-9.]+[ \t]+ports[ \t]*$} $line -> n] { set ports [expr $ports + $n] } }