Filter sufix number


/ Published in: Maxscript
Save to your folder(s)

Get only object name number as string


Copy this code and paste it in your HTML
  1. theNumbers = "1234567890"
  2. objname = "Box5312"
  3. fn filterSufix CorN objName =
  4. (
  5. sfx = trimLeft (trimRight objName) ; local cnt = sfx.count
  6. if cnt != 0 do for i = cnt to 1 by -1 do
  7. (
  8. if findString CorN sfx[i] == undefined do (sfx = replace sfx i 1 "")
  9. ) ; sfx
  10. )
  11. filterSufix theNumbers objname

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.