substitute "_charName$" "blabla_blabla_charName" "";
// Result: blabla_blabla //
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/d1c2b462-f371-4196-9db6-11ac304255f2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
string $charName = "charName"
string $source = "blabla_blabla_charName";
string $stripped = `substitute ("_" + $charName + "$") $source ""`;
// Result: blabla_blabla //
That's what my second reply shows. I stored the substring in $charName and then stripped it. That's what you wanted right?
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/6c032e11-1b77-43c6-be0b-8052ac93af0f%40googlegroups.com.
That's what you wanted right?
options, visit https://groups.google.com/d/optout.
string $srcFile = "blabla_blabla_charName.fbx";
string $saveFileString = basename( $srcFile, ".fbx" );
string $saveFileName = `substitute "_[a-zA-Z0-9]+$" $saveFileString ""`;
string $srcFile = "blabla_blabla_charName.fbx";
string $tokens[];
int $size = tokenize($srcFile, "_", $tokens);
stringArrayRemoveAtIndex($size-1, $tokens);
string $saveFileName = stringArrayToString($tokens, "_");
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/a200980e-cd6a-4c72-bd26-c3954639cd3e%40googlegroups.com.
--To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA1fq6A7%2Bc5UoJ7YddPkQO1TC97ETLA1R%2BhiQgzX%3DOL6CA%40mail.gmail.com.
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/tTDvkKKRX0w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
Anytime. And if we meet, a decent Rum will suit just fine ☺
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CABM86kDwBDezXfoEnZvNCtUsYZMg%2BRqf%3D8JRtVFup9rKNxgS3A%40mail.gmail.com.