json files, regex
Thread poster: Claudia Infantes Villafranca

Claudia Infantes Villafranca  Identity Verified
Spain
Local time: 11:40
English to Spanish
+ ...
Dec 7, 2016

Hi all,

I am working with a json file, after achieving a nice setting up in Studio to have extracted only the text among quotes, I have encountered a problem with some segments which are after [ and before ]. I am trying everything possible to have the text between [ and ] extracted but so far impossible.

Does any of you know which Regex or any other means I could use to make Studio extract the following type of text from a json file?

"summary.0.text.1": "Sie haben keine Stärke ausgewählt. Das kann ein Zeichen dafür sein, dass Sie sich zu wenig zutrauen und lieber auf Ihre eigenen Schwächen schauen.",
"summary.0.text.2": "Tatsächlich entspricht das, was man sich zutraut, nicht dem, was real den persönlichen Fähigkeiten und Kompetenzen entspricht. Oft merkt man erst in Extremsituationen oder im Gespräch mit Freunden und Verwandten, wozu man eigentlich fähig ist.",
"summary.0.tipp.heading": "Unsere Tipps:",
"summary.0.tipp": [
"Führen Sie den Test noch einmal durch und versuchen Sie sich vorzustellen, welche innere Stärke Sie in einer Extremsituation nutzen würden.",
"Auch ein Gespräch mit Freunden und Verwandten kann helfen, Ihren inneren Stärken auf die Spur zu kommen."
]
,


In bold appears the text Studio is unable to open so far ...

Any help would be greatly appreciatedicon_smile.gif


 

Shai Navé  Identity Verified
Israel
Local time: 12:40
Member
English to Hebrew
+ ...
Json file definition Dec 7, 2016

The easiest way to go about this is probably installing the Json file type definition from the App Store.

 

Claudia Infantes Villafranca  Identity Verified
Spain
Local time: 11:40
English to Spanish
+ ...
TOPIC STARTER
json files, regex - json file definition Dec 7, 2016

Hi Shai,

many thanks for your reply! However, I have tried that program and there is a problem when converting the file into a target file, since it does not work properly and therefore, it does not convert the file back into json...

I guess once they get that issue resolved It would be a great program.

Has any of you got the same problem with this program?

Does anyone know any other way to get those segments extracted by Studio?

Many thanks in advance!icon_smile.gif


 

Shai Navé  Identity Verified
Israel
Local time: 12:40
Member
English to Hebrew
+ ...
Have look at Paul's article Dec 8, 2016

I'd consider contacting the developer of the plugin or posting on community.sdl.com because it should work.

You can try to create a new regext filetype. Paul's article walks you through the process.

The regex that you need based on the example you provided is:
Opening pattern: .+\[[\n]"
Closing pattern: "[\n]\],

This will extract only the text in bold, without the quotes.

A more conservative approach if posting here added some linebreaks that do not appear in the JSON file is:
Opening pattern: .+\[
Closing pattern: \],

This will extract the text in bold in your example, only without the square brackets.


 


To report site rules violations or get help, contact a site moderator:


You can also contact site staff by submitting a support request »

json files, regex

Advanced search







SDL Trados Studio 2017 only €435 / $519
Get the cheapest prices for SDL Trados Studio 2017 on ProZ.com

Join this translator’s group buy brought to you by ProZ.com and buy SDL Trados Studio 2017 Freelance for only €435 / $519 / £345 / ¥63000 You will also receive FREE access to Studio 2019 when released.

More info »
Protemos translation business management system
Create your account in minutes, and start working! 3-month trial for agencies, and free for freelancers!

The system lets you keep client/vendor database, with contacts and rates, manage projects and assign jobs to vendors, issue invoices, track payments, store and manage project files, generate business reports on turnover profit per client/manager etc.

More info »



Forums
  • All of ProZ.com
  • Term search
  • Jobs
  • Forums
  • Multiple search