String replace with Wild Card

   2185   1   0
User Avatar
Member
1 posts
Joined: July 2015
Offline
Hey guys, I am trying to automate my alembic imports some by using the strreplace expression function. For example I am using
'strreplace($HIP, “home/fx”, “imports/fountain_v002”)`.abc
This works but I would like to insert a wildcard for “v002”. Asterisk doesn't work, how should that be scripted?
Thank you in advance!
User Avatar
Member
2657 posts
Joined: June 2008
Offline
Try combining the result of two hScript functions. You could add a paddzero for the version number.
`strreplace($HIP, "home/fx", "imports/fountain_v")+padzero(3,$F)`.abc 
https://www.sidefx.com/docs/houdini/expressions/padzero.html [www.sidefx.com]
Edited by Enivob - Feb. 7, 2020 13:08:54
Using Houdini Indie 20.5
Windows 11 64GB Ryzen 16 core.
nVidia 3060RTX 12BG RAM.
  • Quick Links