"disable when" conditionals =~

   1943   2   0
User Avatar
Member
83 posts
Joined: 7月 2005
Offline
the H16 docs show a conditional “=~” as being useable to match a regular expression in a value.

http://www.sidefx.com/docs/houdini16.0/ref/windows/optype#conditionals [www.sidefx.com]

however, “=~” seems to actually behave the same as “==”

I have a parm “parmA” with the value “_foo_bar_”
I have another parm, and the following conditionals do NOT disable the parm:
{ parmA =~ * }
{ parmA =~ /*/ }
{ parmA =~ “*” }
{ parmA =~ foo }
{ parmA =~ “*foo*” }

however, the following conditional *DOES* disable the parm:
{ parmA =~ _foo_bar_ }


has anybody ever gotten a regular expression conditional to disable a parm ?
User Avatar
Member
2042 posts
Joined: 9月 2015
Offline
The docs do say “..depending on application..”

Maybe you need to use !~ instead.
User Avatar
Member
8591 posts
Joined: 7月 2007
Offline
those are houdini style patterns, not regex

if you use proper regular expresions it works:
{ parmA =~ .+ }
{ parmA =~ .*foo.* }
Edited by tamte - 2018年6月27日 15:05:36
Tomas Slancik
FX Supervisor
Method Studios, NY
  • Quick Links