tpham1002002
Technical User
Hi All,
I have trouble to replace the number at the end of this line by empty string, for example I want to replace number 108 (notice that this number repeats many times in the line) at the end of this line by empty string
report_timing -from \[get_cells \"uart_rx_i0/uart_108rx_ctl_i0/*\" -filter {IS_SEQUENTIAL}\] -to \[get_cells \"uart_rx_i0/uart_108rx_ctl_i0/*\" -filter {IS_SEQUENTIAL}\] 108
Here is my code
1) I put the line to a variable
set me "report_timing -from \[get_cells \"uart_rx_i0/uart_108rx_ctl_i0/*\" -filter {IS_SEQUENTIAL}\] -to \[get_cells \"uart_rx_i0/uart_108rx_ctl_i0/*\" -filter {IS_SEQUENTIAL}\] 108"
Get the number at the end of the line
set d [regexp {([0-9]+$)} $me p q]
but I dont know how to replace it by empty string
I tried
regsub {([0-9]+$)} $me "" me
but it doesn't work.
I would like to have your help to resolve the issue
Regards
Tony
I have trouble to replace the number at the end of this line by empty string, for example I want to replace number 108 (notice that this number repeats many times in the line) at the end of this line by empty string
report_timing -from \[get_cells \"uart_rx_i0/uart_108rx_ctl_i0/*\" -filter {IS_SEQUENTIAL}\] -to \[get_cells \"uart_rx_i0/uart_108rx_ctl_i0/*\" -filter {IS_SEQUENTIAL}\] 108
Here is my code
1) I put the line to a variable
set me "report_timing -from \[get_cells \"uart_rx_i0/uart_108rx_ctl_i0/*\" -filter {IS_SEQUENTIAL}\] -to \[get_cells \"uart_rx_i0/uart_108rx_ctl_i0/*\" -filter {IS_SEQUENTIAL}\] 108"
Get the number at the end of the line
set d [regexp {([0-9]+$)} $me p q]
but I dont know how to replace it by empty string
I tried
regsub {([0-9]+$)} $me "" me
but it doesn't work.
I would like to have your help to resolve the issue
Regards
Tony