【发布时间】:2022-12-02 01:09:03
【问题描述】:
output [15:0] pin;
output [1:0] en;
input [6:0] dddr;
input [6:0] dbg;
replace this with ( I am counting the bus)
16 : pin : output;
2 : en : output;
7 : dddr : input;
7 : dbg :input;
I tried this code after opening the file and stored it in var. but i am not able to filter it like above
if ($var =~ /(\w+)\[(\d+)\:/) {
print "word=$1 number=$2\n";
}
//i am trying to add : in middle of the columns also
【问题讨论】:
-
You are missing the whitespace.