This seems simple, yet I’m struggling
I have:
underscore12underscore
M10
GR2
23AF
I need:
12
10
2
23
This seems simple, yet I’m struggling
I have:
underscore12underscore
M10
GR2
23AF
I need:
12
10
2
23
Another option:
output = []
for x in IN[0]:
output.append(float(filter(str.isdigit, x)))
OUT = output
This can of course be used in a “closed” python node as well:
I’m too slow with typing … lolz. But this is basicly the same as @Andreas_Dieckmann does using the useful clockwork package nodes
Script
import re
strings = IN[0]
output = []
for str in strings:
matches = re.findall('\d+', str)
output.append(matches)
OUT = output
Brilliant, thank you all very much!
Can also do this OOTB
String.Concat(List.Clean(String.ToNumber(String.Split(s,"")),false)+"");
How do I get the decimals and digits in this?
Have this…
after…
String.Replace(strings, “Level “, “”);
Using @Andreas_Dieckmann’s model, just add a period within the regex string:
Need something that will remove any letters and leave the numbers and decimals, thanks Kenny n Jacob
Thanks for your responde
How do modify your code if you have a float number? i.e 12.5
Regards
use @Andreas_Dieckmann and @kennyb6 's model