Home Coding, Scripting, Shaders

(Maya) MEL need help with extracting numeric part of a name

polycounter lvl 9
Offline / Send Message
Bodizzz polycounter lvl 9
Hi guys, i am trying to extract numeric value of a name. For example i have listed an edge and i got :
// Result: pCube1.e[17] //  

How can i extract just the number, so i can get something like this: 
/ Result: 17// 


I tried using match command, but i can't achieve result i want, 

string $node = "pCube1.e[17]";
string $suffix = `match "[[0-9]+]" $node`;

and it gives me:  // Result: [17] // 

how to get rid if those square brackets?





Replies

Sign In or Register to comment.