JS backward string interpolation

51 Views Asked by At

I'm going to parse a big custom-formed config from txt to class, adjust it in Form and then save it back. Saving is not a problem, I can use Interpolation and this is awesome.

After this, I just wondered if I can do a backward interpolation, like the destruction of text file content.

So I can get values '1','Boing','green' from this config

1; 0=BMW,1=Volvo
boing;
green;

like this

{car}; 0=BMW,1=Volvo
{plane};
{color};

UPD: It's just an example, and Parsing of this one takes time. Real file has about 1K lines

0

There are 0 best solutions below