Retrieve specific value and replace the member index

Hallo dear communiuty,

I need I little help to retrieve a speciefic values from a list and replace with another value.
In specific the only index with a values that have a 0 after the comma (p.e. 0.0xxxx, 0.00xxx, 0.000xxx) must become 1.


Unfortunaltely the matchtext, the retrieveitem and the member index component, they didn’t help me, because I have to leave the original value, without rounding it.

Any advice??
Search_and_Replace.gh (65.4 KB)

Thanks and best regards


Search_and_Replace_re.gh (73.5 KB)

2 Likes

2 Likes

Dear Yoann, thanks for the solution,

but the expression say me “X as invalid name,only use alphanumeric characters…”.
Any advice?

This is bug in old grasshopper versions, grasshopper menu: disable Display->Draw Full Names
Or if you want to keep the full names, rename the input of the expression from “variable x” to “x”

1 Like