Skip to content

Commit

Permalink
Add docs for multiline string literals.
Browse files Browse the repository at this point in the history
  • Loading branch information
wxsBSD committed May 8, 2024
1 parent d49149f commit ef1bb47
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/writingrules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1610,6 +1610,12 @@ identifier/value pairs like in the following example:
my_identifier_1 = "Some string data"
my_identifier_2 = 24
my_identifier_3 = true
my_identifier_4 = """
I am a multiline string literal.
I will be stored in your rule directly as is. If you have
escape sequences like \x41 those will be converted to their
raw byte value. When done, just add the closing quotes.
"""
strings:
$my_text_string = "text here"
Expand All @@ -1626,6 +1632,8 @@ Note that identifier/value pairs defined in the metadata section cannot be used
in the condition section, their only purpose is to store additional information
about the rule.

NOTE: Multiline string literals are supported starting in YARA 4.6.0.

.. _using-modules:

Using modules
Expand Down

0 comments on commit ef1bb47

Please sign in to comment.