I need to make a script which generates this code:
<CharacterStyleRange FillColor="">
<Properties>
<AppliedFont type="string">Agency FB</AppliedFont>
</Properties>
<Content>Hallo</Content>
</CharacterStyleRange>
<CharacterStyleRange FillColor="" FontStyle="Bold">
<Properties>
<AppliedFont type="string">Agency FB</AppliedFont>
</Properties>
<Content>ik</Content>
</CharacterStyleRange>
<CharacterStyleRange FillColor="">
<Properties>
<AppliedFont type="string">Agency FB</AppliedFont>
</Properties>
<Content>ben een zin</Content>
</CharacterStyleRange>
<CharacterStyleRange FillColor="" FontStyle="Bold">
<Properties>
<AppliedFont type="string">Agency FB</AppliedFont>
</Properties>
<Content>Met bold</Content>
</CharacterStyleRange>
From this:
Hallo [bold]ik[/bold] ben een zin [bold]met bold[/bold]
Basically what I want is to strip the sentence with the [bold] [/bold] tags, and make a new (with all the other items as shown) for it.
I've tried a couple things but haven't been able to get it properly working, so now I am asking it here.
The language which it has to be transferred into is IDML(This language is used to build InDesign documents)
I think you could use Regular expression to extract all these text enclosed in
[bold].You will get
"ik".