RegEx/JSON/PropertyName.regex.txt
# A property within a JSON string
(?<= # After: [\{\,] # A bracket or comma ) \s{0,} # Optional Whitespace (?<Quoted>["'])? # There's an optional opening quote (?<Name> # Capture the Name, which is: .+? # Anything until... ) (?= (?(Quoted) # If quoted ((?<!\\)\k<Quoted>) # the closing quote | ([\s:]) # otherwise, whitespace or a colon ) ) (?: # Match but don't store: (?(Quoted)(\k<Quoted>)) \s{0,} # a double-quote, optional whitespace: ) (?=\:) # Look ahead to see that we're followed by a :, but don't include it in the match. |