3
我想解析使用-componentsSeparatedByString:
以下字符串:如何使用componentsSeparatedByString忽略包含子字符串的單詞:?
CHAPTER 5. RULE OF DECISION
CHAPTER 6. GOVERNMENTAL EXEMPTION FROM BOND AND SECURITY REQUIREMENTS
CHAPTER 7. LIABILITY OF COURT OFFICERS
SUBCHAPTER A. LIABILITY OF OFFICER
SUBCHAPTER B. LIABILITY OF ATTORNEY
SUBCHAPTER C. SUIT ON OFFICIAL BONDS
CHAPTER 8. STATE EXEMPTION FROM CERTAIN FEES: FEES PAID BY OPPOSING PARTY
CHAPTER 9. FRIVOLOUS PLEADINGS AND CLAIMS
SUBCHAPTER A. GENERAL PROVISIONS
SUBCHAPTER B. SIGNING OF PLEADINGS
CHAPTER 10. SANCTIONS FOR FRIVOLOUS PLEADINGS AND MOTIONS
但是當我使用CHAPTER
作爲字符串通過分離,子章節元素也得到分解,因爲它們包含在其中的篇章。
如何避免在使用-componentsSeparatedByString解析章節時停止SUBCHAPTER元素:?