This is my code
# -*- coding: utf-8 -*- import json import re with open("/Users/paul/Desktop/file.json") as json_file: file = json.load(json_file) print file["desc"] key="capacità" result = re.findall("((?:[\S,]+\s+){0,3})"+key+"\s+((?:[\S,]+\s*){0,3})", file["desc"], re.IGNORECASE) print result This is the content of the file
{ "desc": "Frigocongelatore, capacit\u00e0 di 215 litri, h 122 cm, classe A+" } My result is []
but what I want is result = "capacità"