Notifications
Clear all

[Closed] matchPattern do not see the matching ?

Hello all,
I am quite stuck on something that seems quite simple… I am trying to remove from an array an item using matchPattern … but…

here’s my Array
MyTotalBoneList = #(“BBBone001”, “ABone002”, “BCone003”, “BBone004_Donuts00”)

And here’s what I have come up :

For Bname = 1 to MyTotalBoneList.count do
(
MyBone = MyTotalBoneList[Bname]
MyDonuts = matchPattern MyBone pattern:“Donuts*” ignoreCase:false
if MyDonuts == true then
(
deleteItem MyTotalBoneList.count Bname
print MyTotalBoneList
)
else
(
print “no match”
)
)

… And he is printing “no match” for all 4… even if the pattern Donuts is well here…
Someone could point me where to find my mistake please ?

Thanks for your help, I am quite beginner in maxscript and I’m learning a lot on this forum (actually I often get more answers by browsing here than in the help…).

2 Replies

you use wrong pattern… it has to be “Donuts

…Shame on me… Thanks !