Mam subor, v ktorom su utriedene data v urcitej strukture, a potrebujem tieto data dostat odtial do nejakej premenej - objektu alebo niecoho s cim sa mi bude dobre pracovat.
Struktura suboru:
Kód: Vybrať všetko
@BOOK{Shinskey88,
author = {F. G. Shinskey},
year = 1988,
title = {Process Control Systems: Application, Design and Tuning},
edition = {3rd},
publisher = {McGraw-Hill, New York}
}
@BOOK{Ogata90,
author = {K. Ogata},
year = 1990,
title = {Modern Control Engineering},
edition = {2nd},
publisher = {Prentice-Hall, Englewood Cliffs, NJ}
}
@ARTICLE{CC53,
author = {G. H. Cohen and G. A. Coon},
year = 1953,
title = {Theoretical Consideration of Retarded Control},
journal = {Trans. ASME},
volume = 75,
pages = {827-834}
}
zatial som dosiel na nieco taketo
Kód: Vybrať všetko
var re1=/@\w*\{{1}((.*)\n*)*\}/g;
var result1=text.match(re1);
for(var i=0;result1[i];i++){
console.log("["+i+"]: "+result1[i]);
}
Konkretne ako mu povolit vsetky znaky medzi tymito zatvorkami @BOOK{ }