この正規表現は問題なく機能します。
[a-zA-Z0-9]*\s*?=\s*?.*?(?:{[^}]*}|(?=;))
ブラケットは 1 レベルのみ許可されていることに注意してください。正規表現はネストされたブラケットを処理しません。
あなたの例から、次の行がキャッチされます。
isa = PBXBuildFile
fileRef = C0480C2015F4F91F00E0A2F4 /* zip.c */
isa = PBXBuildFile
fileRef = C0480C2315F4F91F00E0A2F4 /* ZipArchive.mm */
settings = {COMPILER_FLAGS = "-fno-objc-arc"; }
正規表現の説明は次のとおりです。
[a-zA-Z0-9]*\s*?=\s*?.*?(?:{[^}]*}|(?=;))
Options: ^ and $ match at line breaks
Match a single character present in the list below «[a-zA-Z0-9]*»
Between zero and unlimited times, as many times as possible, giving back as needed (greedy) «*»
A character in the range between “a” and “z” «a-z»
A character in the range between “A” and “Z” «A-Z»
A character in the range between “0” and “9” «0-9»
Match a single character that is a “whitespace character” (spaces, tabs, and line breaks) «\s*?»
Between zero and unlimited times, as few times as possible, expanding as needed (lazy) «*?»
Match the character “=” literally «=»
Match a single character that is a “whitespace character” (spaces, tabs, and line breaks) «\s*?»
Between zero and unlimited times, as few times as possible, expanding as needed (lazy) «*?»
Match any single character that is not a line break character «.*?»
Between zero and unlimited times, as few times as possible, expanding as needed (lazy) «*?»
Match the regular expression below «(?:(?={){[^}]*}|(?=;))»
Match either the regular expression below (attempting the next alternative only if this one fails) «(?={){[^}]*}»
Match the character “{” literally «{»
Match any character that is NOT a “}” «[^}]*»
Between zero and unlimited times, as many times as possible, giving back as needed (greedy) «*»
Match the character “}” literally «}»
Or match regular expression number 2 below (the entire group fails if this one fails to match) «(?=;)»
Assert that the regex below can be matched, starting at this position (positive lookahead) «(?=;)»
Match the character “;” literally «;»