JellyFire
02-07-2008, 07:16 PM
Hey guys/girls.
I'm having a bit of trouble working with substitute:
Say I have an imagePlane "imageName.0001.jpg"
I want to strip it down to "imageName"
Eventually I will add "imageName.####.jpg" and "imageName.####iff" for a shake script...
Anyway, what I have is this:
string $imageSeq = "imageName.0001.jpg"; //(this is just an example of course
string $stripped = `substitute ".[0-9].jpg" ($imageSeq) ("");
print ($stripped);
It returns "imageName.00"
How do I get it to return just "imageName"?
I hope someone can help to explain this to me, I find it quite confusing.
Thanks
Christian
I'm having a bit of trouble working with substitute:
Say I have an imagePlane "imageName.0001.jpg"
I want to strip it down to "imageName"
Eventually I will add "imageName.####.jpg" and "imageName.####iff" for a shake script...
Anyway, what I have is this:
string $imageSeq = "imageName.0001.jpg"; //(this is just an example of course
string $stripped = `substitute ".[0-9].jpg" ($imageSeq) ("");
print ($stripped);
It returns "imageName.00"
How do I get it to return just "imageName"?
I hope someone can help to explain this to me, I find it quite confusing.
Thanks
Christian
