Skip to content

Commit ef1bb47

Browse files
committed
Add docs for multiline string literals.
1 parent d49149f commit ef1bb47

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/writingrules.rst

+8
Original file line numberDiff line numberDiff line change
@@ -1610,6 +1610,12 @@ identifier/value pairs like in the following example:
16101610
my_identifier_1 = "Some string data"
16111611
my_identifier_2 = 24
16121612
my_identifier_3 = true
1613+
my_identifier_4 = """
1614+
I am a multiline string literal.
1615+
I will be stored in your rule directly as is. If you have
1616+
escape sequences like \x41 those will be converted to their
1617+
raw byte value. When done, just add the closing quotes.
1618+
"""
16131619
16141620
strings:
16151621
$my_text_string = "text here"
@@ -1626,6 +1632,8 @@ Note that identifier/value pairs defined in the metadata section cannot be used
16261632
in the condition section, their only purpose is to store additional information
16271633
about the rule.
16281634

1635+
NOTE: Multiline string literals are supported starting in YARA 4.6.0.
1636+
16291637
.. _using-modules:
16301638

16311639
Using modules

0 commit comments

Comments
 (0)