I have a variable called line
that can contain something like this with adj or n or adv always appearing first:
adj 1: text
n 1: any string
adv 1: anything can be here
How can I change these to be:
j 1: text
n 1: any string
v 1: anything can be here
Where the "adj", "adv" and "n" appear at the start of a line but can have any number of spaces before them?