json files, regex
Thread poster: Claudia Infantes Villafranca

Claudia Infantes Villafranca  Identity Verified
Spain
Local time: 04:59
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 appreciated


Direct link Reply with quote
 

Shai Navé  Identity Verified
Israel
Local time: 05:59
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.

Direct link Reply with quote
 

Claudia Infantes Villafranca  Identity Verified
Spain
Local time: 04:59
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!


Direct link Reply with quote
 

Shai Navé  Identity Verified
Israel
Local time: 05:59
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.


Direct link Reply with quote
 


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







memoQ translator pro
Kilgray's memoQ is the world's fastest developing integrated localization & translation environment rendering you more productive and efficient.

With our advanced file filters, unlimited language and advanced file support, memoQ translator pro has been designed for translators and reviewers who work on their own, with other translators or in team-based translation projects.

More info »
TM-Town
Manage your TMs and Terms ... and boost your translation business

Are you ready for something fresh in the industry? TM-Town is a unique new site for you -- the freelance translator -- to store, manage and share translation memories (TMs) and glossaries...and potentially meet new clients on the basis of your prior work.

More info »



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