Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I escape % characters in YAML?

Tags:

ruby

yaml

How can I escape % characters in YAML?

like image 321
mat Avatar asked May 18 '11 21:05

mat


People also ask

How do you write special characters in YAML?

YAML doesn't require quoting most strings but you'll want to quote special characters if they fall within a certain list of characters. Use quotes if your value includes any of the following special characters: { , } , [ , ] , & , * , # , ? , | , - , < , > , = , ! , % , @ , : also ` and , YAML Spec.

How do you escape characters?

Escape CharactersUse the backslash character to escape a single character or symbol. Only the character immediately following the backslash is escaped. Note: If you use braces to escape an individual character within a word, the character is escaped, but the word is broken into three tokens.

How do I escape a character in a string?

To insert characters that are illegal in a string, use an escape character. An escape character is a backslash \ followed by the character you want to insert.


1 Answers

Try %% it might work to escape.

like image 97
Naftali Avatar answered Sep 20 '22 21:09

Naftali