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
  Replace values in Yaml file with value in dictionary PelleH 1 3,687 Feb-11-2025, 09:51 AM
Last Post: alexjordan
Question [SOLVED] How to replace characters in a string? Winfried 2 1,912 Sep-04-2024, 01:41 PM
Last Post: Winfried
  Warning - ' invalid escape sequence '\s'' tester_V 4 53,248 Aug-08-2024, 04:58 PM
Last Post: tester_V
  using last 2 characters of a file name to identify it CAD79 5 3,142 Jul-12-2024, 02:09 PM
Last Post: deanhystad
  capturing multiline output for number of parameters jss 3 2,431 Sep-01-2023, 05:42 PM
Last Post: jss
  Need to replace a string with a file (HTML file) tester_V 1 2,941 Aug-30-2023, 03:42 AM
Last Post: Larz60+
  doing string split with 2 or more split characters Skaperen 22 9,148 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 4,415 Apr-12-2023, 10:39 AM
Last Post: jefsummers
  use of escape character in re.sub and find WJSwan 1 2,052 Feb-16-2023, 05:19 PM
Last Post: Larz60+
  Append data to Yaml section tbaror 0 9,435 Feb-09-2022, 06:56 PM
Last Post: tbaror

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020
This forum uses Lukasz Tkacz MyBB addons.
Forum use Krzysztof "Supryk" Supryczynski addons.