contains
Check if a string contains a substring or matches a regex. Returns true
if found.
Examples
Check if /etc/passwd
content contains root
:
file("/etc/passwd").content.contains("root")
contains
Check if a string contains a substring or matches a regex. Returns true
if found.
Check if /etc/passwd
content contains root
:
file("/etc/passwd").content.contains("root")