files =["""Functional Assessment: Patient currently displays the following functional limitations and would benefit from treatment to maximize functional use and pain reduction: Range of Motion: limited . ADLs: limited . Gait: limited . Stairs: limited . Squatting: limited . Work participation status: limited . Current Status: The patient's current status is improving.
Location: Right side
output: limited | Right side""","""
Functional Assessment: Patient currently displays the following functional limitations and would benefit from treatment to maximize functional use and pain reduction: Range of Motion:
painful
and
limited
Strength:
limited """]
reg =re.compile(r'\b(Location|Range of Motion):\s*([^\W_].*?)\s*(?=(?:\.\s*)?[^\W\d_]+:|\Z)',re.S | re.M)