I have a dictionary in .txt format, which looks like this:
term 1
definition 1
definition 2
term 2
definition 1
definition 2
definition 3
etc.
There is a tab always before a definition, basically it's like this:
term 1
[tab]definition 1
[tab]definition 2
etc.
Now I need to wrap every term and it's definitions with <term>
tag, i.e:
<term>
term 1
definition 1
definition 2
</term>
I was trying to use regular expressions to find term with it's definitions, but with no luck. Could you please help me with this?
Thank you for any suggestions!