ScriptSpot

Forum topic · Scripts Wanted

way to extract variable from text

By dussla · 2020-09-15

Description

hello~~
sorry sorry , i need some help again .

i have

Layer:0J6A4584_JPG_274__22_mm
Layer:0J6A4582_JPG_22__153_mm

name object

a = 274
b = 22

a= 22
b= 153

etc...

i need to extract some text from object name

pls how can do that ?~~

Comments (2)

.

jahman · 2020-09-15



for i in filterstring "Layer:0J6A4584_JPG_274__22_mm" "_" where (num = i as number; isKindOf num number) collect num


#(274, 22)

Wow wow thanj you

dussla · 2020-09-15

Very simple and perpect~~
Really thank you~~~