Separating number from string

Hi! I’m a new user here. I have a problem with the string.replace node. I need to get the number “2407.31” and get rid off the “kg/m3”. But I can’t find how to write the cubed symbol in code-block. I would be thankful for any help!

Alt+0179 on the numpad should work.


Using Regex might be a cleaner way to get to the end result you’re after. Clockwork has nodes for it if you want to avoid Python. (Although perhaps care is required if that kg/m³ is from a user entered text field where they might accidentally write kg/m3 and suddenly you’ve got inaccurate values).


Thanks a lot! It works perfectly.