Eliminate part of name

Hello everyone,

I have list of elements with names: A_0000_B_C. How I can eliminate _0000 and get just A_B_C?

HI @Gytis_Jurgelevicius

You can use string.replace node, as you see below.

1 Like

Thank you @Mohammad_Nawar

It can be solution, but sometimes 0000 isnt constant and I don’t know how to eliminate 0000 in any case :confused:

@Gytis_Jurgelevicius

if you show me your dyn, maybe I can help u

@Mohammad_Nawar

I just want to create views in Revit project browser from existing levels. Name must be made from level name (S_SL17_0_01S) and name of view group (e.g.: floor plans) Result: S_SL17_0_01S_Floor plans. But in this situation I don’t need SL17 and I want to get S_0_01S_Floor plans
I attached my printscreen:

Hi @Gytis_Jurgelevicius

@Mohammad_Nawar solution is not quite right. It added an extra “_” symbol. I suggest you use another approach.

1 Like

@Kulkul

it’s not adding extra symbol :slight_smile: , I just didn’t put it inside the code block, to remove the underscore “0000_”

1 Like

@Mohammad_Nawar It seems you have forgotten to add :grinning:

1 Like

Thanks @Mohammad_Nawar @Kulkul

Its works perfectly :slight_smile:

1 Like