FORUMS: list search recent posts

How to get the numeric string in MEL?

COW Forums : Autodesk Maya

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Mostafa Talebi
How to get the numeric string in MEL?
on Jan 30, 2012 at 10:17:21 am

hello everybody

I have searched Mel document, but haven't found anything about string type in MEL. for example to enquire the existence of a number in the name of an object.

For instance I want replace the incremental numbers being placed after each object.

What should I do about such string?


Return to posts index

Steve Sayer
Re: How to get the numeric string in MEL?
on Jan 30, 2012 at 4:21:38 pm

There is a whole section in the command documentation on strings!

http://download.autodesk.com/global/docs/maya2012/en_us/Commands/cat_Langua...

You will need to learn to use regular expressions for this. The workhorse is the 'match' command, but you should also become familiar with related commands like gmatch, substring, endsWith, and so on.

The Maya help files don't have extensive explanations about regular expressions, but you can Google them. There's lots of info out there.


Return to posts index

Mostafa Talebi
Re: How to get the numeric string in MEL?
on Jan 30, 2012 at 5:45:45 pm

Thanks a million!


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]