2
1
In my file I want to replace number to *
Example:
data[0] ---> data[*]
I have data[0]
to data[127]
and also want to do for the whole file.
So how can I do only for number?
I tried with command
sed 's/[[0-9][0-9]]/[*]/g'
but it does not work properly.
So please guide me.
why shouldn't it be as simple as
sed 's/[0-9]/*/g
? – datdinhquoc – 2018-10-09T08:37:18.2931It will also affect other number also. Suppose set_load -pin_load 0.5 [get_ports {data[25]}] then it will also change 0.5 to *. – Vishal Patel – 2018-10-09T08:46:23.173
The issue in what you tried is not escaping square brackets when you don't want them to have a special meaning. – simlev – 2018-10-10T12:54:43.850