$str =~ m% # "" ((?:(?!).)*?) # Capture the text in between. # "" (?:(?!).)*? # In the same record, maps # "content" must be "maps". %xgsi;