How to use "Rename by regex"

Hallo guys,

how can i use the transform “rename by regex” for example i have this result:

app_code_cpu_entw_rtw1.CPU {dasfSysCPU5min_attributes_dn: sgrvrthf/eaw-1/node-1100/sys/fgrefrt/CDprocSysCPU5min}

how can i show only the “node-1100” by using the rename by regex ?

thanks
Moaz

How much of the example you have shown is constant, and how much is variable
from one ocurrence to the next?

For example, does every instance start with “sgrvrthf”? Does every instance
have “eaw-1” as the second item between “/”?

Is it true that you are always looking for the 3rd of 6 items delimited by “/”
characters?

I’m sure someone can help, provided we understand how fixed or variable your
input is.

Antony.

Hallo Antony,

the examples are three:

1- app_code_cpu_entw_rtw1.CPU {dasfSysCPU5min_attributes_dn: sgrvrthf/eaw-1/node-1100/sys/fgrefrt/CDprocSysCPU5min}
2- app_code_cpu_entw_rtw1.CPU {dasfSysCPU5min_attributes_dn: sgrvrthf/eaw-1/node-1110/sys/fgrefrt/CDprocSysCPU5min}
3- app_code_cpu_entw_rtw1.CPU {dasfSysCPU5min_attributes_dn: sgrvrthf/eaw-1/node-1112/sys/fgrefrt/CDprocSysCPU5min}

and im always looking for the “node-$$$$”

thanks
Moaz

So, how about regex = “./(node-[^/]+)/.” and replace = “$1”?

Antony.

Hallo Antony,

nope :frowning:

Moaz

Hi,

its works only with 3 of “rename with regex”, i cut the result on the 3 rename of regex