Created
July 2, 2023 08:53
-
-
Save cabo/7b3f3c249635940f7a9c2d847fd2d097 to your computer and use it in GitHub Desktop.
ABNF: Convert RFC 7405 case-sensitive strings to RFC 5234
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
s = ARGF.read | |
s.gsub!(/%s"([^"]+)"/) { | |
"%x#{$1.chars.map{|c|c.ord.to_s(16)}.join(".")}" | |
} | |
puts s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment