Skip to main content

SOAR Condition - Contains

  • October 12, 2023
  • 4 replies
  • 20 views

mokatsu
Forum|alt.badge.img+6

Does this command only work on array type input? or can it also check if a substring exists within a string? 

4 replies

Forum|alt.badge.img+2
  • Bronze 1
  • October 20, 2023

contains used in a playbook flow condition will check if a substring exists in a string.  Hope this helps!


Forum|alt.badge.img+2
  • New Member
  • October 23, 2023

Hello @mokatsu,

The SOAR scripting command "Contains" can be used to check if a value exists within a data structure. It's not limited to arrays but can also be used to check if a substring exists within a string. So, you can use it to check for the presence of a specific substring within a string in your SOAR scripts.

Thank you..


mokatsu
Forum|alt.badge.img+6
  • Author
  • Bronze 5
  • October 23, 2023

@rahulr 
Thank you for the explanation, I do have a follow up question. From action input
[    ]  [contains] [     ]
does it function where the left side is the substring and the right side is the list/string?
"test" contains "Testsomething"
or  reverse, where the left side is the list/string and right side the sub string?



Chris_B
Forum|alt.badge.img+8
  • Silver 2
  • October 24, 2023

Can you also use regex?