PDA

View Full Version : possible to detect if name with wildcard matches node?


MegaManZZ
11-05-2010, 09:01 PM
ill try to explain what im after

let "$i" equal a node that's called "abcd"

is it possible to do something like


if ($i == "*bc*")
do this;

goleafsgo
11-05-2010, 09:13 PM
You want either "match" or "gmatch" commands.

From the help doc's for gmatch:

MEL examples

gmatch "matches" "m*s";
// Result: 1 //
gmatch "matches" "mat*";
// Result: 1 //
gmatch "matches" "ma[a-z]ches";
// Result: 1 //
gmatch "matches" "ma[!a-m]ches";
// Result: 1 //
gmatch "matches" "ma?ches";
// Result: 1 //
gmatch "no match" "?atch";
// Result: 0 //

CGTalk Moderation
11-05-2010, 09:13 PM
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.