Check a partial string value

   812   1   0
User Avatar
Member
133 posts
Joined: March 2016
Offline
Hello - Im wanting to check the first few characters in a string using vex, but im not sure how to do it?

For example im using the following where 'obj9a...' is the same acoss hundreds of prims but the last numbers change.
Is there a way to just check if the 'obj9a' is the same and remove the prim?

if(s@name == 'obj9a019'){
   removeprim(0,@primnum,1);

}
Edited by Hatchery - Dec. 17, 2021 12:08:11
Love Houdini
User Avatar
Member
133 posts
Joined: March 2016
Offline
found it

if(match('obj9a*',s@name)){
   removeprim(0,@primnum,1);

}
Love Houdini
  • Quick Links