Python Forum
Yaml File escape characters in multiline string
Thread Rating:
  • 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Yaml File escape characters in multiline string
#1
i want use \n character in multiline string but yaml don't allow me to use \n character how can i use \n character.

my code
    treeroot:
        branch1:
            name: >
                hello my friend\n how are you ?
                i am fine and you ?\n
                yes\nthanks
            branch1-1:
                name: Node 1-1
        branch2:
            name: Node 2
            branch2-1:
                name: Node 2-1
i know, we can use \n character in single lane mode but i want use it in multiline.

also, i want ask that what are the differences betwwen | and > characters ? i can never see differences between its

Thanks.

i solved.

http://stackoverflow.com/questions/37904...iple-lines
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  capturing multiline output for number of parameters jss 3 766 Sep-01-2023, 05:42 PM
Last Post: jss
  Need to replace a string with a file (HTML file) tester_V 1 698 Aug-30-2023, 03:42 AM
Last Post: Larz60+
  doing string split with 2 or more split characters Skaperen 22 2,317 Aug-13-2023, 01:57 AM
Last Post: Skaperen
  How do I check if the first X characters of a string are numbers? FirstBornAlbratross 6 1,426 Apr-12-2023, 10:39 AM
Last Post: jefsummers
  use of escape character in re.sub and find WJSwan 1 876 Feb-16-2023, 05:19 PM
Last Post: Larz60+
  Append data to Yaml section tbaror 0 6,885 Feb-09-2022, 06:56 PM
Last Post: tbaror
  Escape indentation Frankduc 11 2,977 Jan-31-2022, 02:41 PM
Last Post: Frankduc
  add Escape charcters in string GrahamL 3 1,140 Jan-20-2022, 01:15 PM
Last Post: GrahamL
Question [SOLVED] Delete specific characters from string lines EnfantNicolas 4 2,143 Oct-21-2021, 11:28 AM
Last Post: EnfantNicolas
  Presenting multiline data into single line aaronbuhu 1 1,768 Aug-05-2021, 10:57 AM
Last Post: jamesaarr

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020