\s{0,} # Match preceeding whitespace (?> # A JSON value can be: (?true) # 'true' | # OR (?false) # 'false' | # OR (?null) # 'null' | # OR (? # an object, which is \{ # An open brace (?> # Followed by... [^\{\}]+| # any number of non-brace character OR \{(?)| # an open brace (in which case increment depth) OR \}(?<-Depth>) # a closed brace (in which case decrement depth) )*(?(Depth)(?!)) # until depth is 0. \} # followed by a closing brace ) | # OR (? # a list, which is \[ # An open bracket (?> # Followed by... [^\[\]]+| # any number of non-bracket character OR \[(?)| # an open bracket (in which case increment depth) OR \](?<-Depth>) # a closed bracket (in which case decrement depth) )*(?(Depth)(?!)) # until depth is 0. \] # followed by a closing bracket ) | # OR (? # A string, which is " # an open quote .*? # followed by anything (?=(? # A number, which (? (?\-)? # It might be start with a - (?:(?> # Then it can be either: (?\d+) # One or more digits (the Characteristic) (?:\.(?\d+)){0,1} # followed by a period and one or more digits (the Mantissa) | # Or it can be (?:\.(?\d+)) # just a Mantissa )) (?: # Optionally, there can also be an exponent E # which is the letter 'e' (?[+-]\d+) # followed by + or -, followed by digits. )? ) ) ) ) \s{0,} # Optionally match following whitespace