PDA

View Full Version : file sequence


tomkun
05-06-2008, 01:49 PM
Hi.
Im trying to write a script that import a file sequence into maya.
I need to remove the numbers from the file so I'll know its name and the to add them again till Im all out of files while adding one to the number each time to loop accures.

how do I remove the numbers?

thanks,
Tomer.

vishangshah
05-07-2008, 01:32 AM
string $filename = "sequence01234";
string $numbers = `match "[0-9]+" $filename`;
$filename = `substitute $numbers $filename ""`;
print $filename;


but the numbers should not occur more than once,
in case like "012sequence345", match command will return 012 only,


:)
Vishang Shah

CGTalk Moderation
05-07-2008, 01:32 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.