Skip to content

Commit

Permalink
fix: update uuid regex
Browse files Browse the repository at this point in the history
  • Loading branch information
Konstantin Goryachev committed May 26, 2024
1 parent 28ae5c3 commit 4cee9ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/json_schemer/format.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ module Format
IP_REGEX = /\A[\h:.]+\z/.freeze
INVALID_QUERY_REGEX = /\s/.freeze
IRI_ESCAPE_REGEX = /[^[:ascii:]]/
UUID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i
UUID_REGEX = /\A\h{8}-\h{4}-\h{4}-\h{4}-\h{12}\z/i
NIL_UUID = '00000000-0000-0000-0000-000000000000'
BINARY_TO_PERCENT_ENCODED = 256.times.each_with_object({}) do |byte, out|
out[-byte.chr(Encoding::BINARY)] = -sprintf('%%%02X', byte)
Expand Down

0 comments on commit 4cee9ef

Please sign in to comment.