How do you get regex to continue matching strings to a certain point?

Asked

Viewed 34 times

-1

I have a very large and confusing string that I’m picking up from a Crapping web. Here a piece:

 {"refineBy":"Filtro","feedbackYesLable":"H\\xc3\\xa1 alguma melhoria adicional que possamos fazer na sua experi\\xc3\\xaancia de busca?","resultsFor":"Resultados para","year":"Ano","vehicleEnterNew":"Adicionar Ve\\xc3\\xadculo","allCate":"Todas Categorias","clearAll":"Limpar tudo","view":"Visualiza\\xc3\\xa7\\xc3\\xa3o","bestMatch":"Melhor resultado","pages":"P\\xc3\\xa1ginas","fewSpell":"Esses s\\xc3\\xa3o os produtos encontrados em {0}. Continuar pesquisando por {1}?","price":"Pre\\xc3\\xa7o","submitSurvey":"Enviar pesquisa","sortBy":"Ordenar por","model":" Modelo","successBody":"Seus coment\\xc3\\xa1rios s\\xc3\\xa3o importantes para n\\xc3\\xb3s e nos ajudam a melhorar nossos resultados de busca para todos os nossos clientes.","moreRefine":"Mais Refinamento","newest":"Mais recente","results":"Resultados","ommitNotice":"Alguns resultados foram omitidos, pois talvez n\\xc3\\xa3o correspondam \\xc3\\xa0 sua busca. Se voc\\xc3\\xaa quiser visualizar todos os resultados","orders7d":"Pedidos nos \\xc3\\xbaltimos 7 dias","shipFrom":"Local de envio","filterVehicle":" Filtrar por Ve\\xc3\\xadculo","feedbackNoLable":"Que problemas voc\\xc3\\xaa teve com a experi\\xc3\\xaancia de busca?"

But I want to take a certain part that occurs in this string 60 times, and the length of that part varies every time, but the start is always the same. Example:

"seoTitle":"Bordado cheongsam vestido bon...

It would be possible to write a regex that follows the logic of 'while "} does not appear, keep matching'?

  • 1

    Do not use regex. By format, looks like that the return is a JSON, then use the module json: https://docs.python.org/3/library/json.html

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.