I am new to using regex. I would like to use Notion to create a personal reference manager. My idea is to extract information from one column containing a bibtex entry to another column, that would contain, for instance, the title of the paper.
My idea that worked better so far:
replaceAll(
replaceAll(prop("Bibtex"), "^((.|\n)*)[tT]itle(\\s|.*)=(\\s|.*){", ""),
"}((.|\n)*)",
""
)
but it fails if the title has any curly brackets. For instance, the Bibtex entry
@article{xu2015experimental,
title = {Experimental Detection of a Majorana Mode in the core of a Magnetic Vortex inside a Topological Insulator-Superconductor ${\mathrm{Bi}}{2}{\mathrm{Te}}{3}/{\mathrm{NbSe}}_{2}$ Heterostructure},
author = {Xu, Jin-Peng and Wang, Mei-Xiao and Liu, Zhi Long and Ge, Jian-Feng and Yang, Xiaojun and Liu, Canhua and Xu, Zhu An and Guan, Dandan and Gao, Chun Lei and Qian, Dong and Liu, Ying and Wang, Qiang-Hua and Zhang, Fu-Chun and Xue, Qi-Kun and Jia, Jin-Feng},
journal = {Phys. Rev. Lett.},
volume = {114}, issue = {1},
pages = {017001},
numpages = {5},
year = {2015},
month = {Jan},
publisher = {American Physical Society},
doi = {10.1103/PhysRevLett.114.017001},
url = {https://link.aps.org/doi/10.1103/PhysRevLett.114.017001} }
becomes
@article{xu2015experimental,
title = {Experimental Detection of a Majorana Mode in the core of a Magnetic Vortex inside a Topological Insulator-Superconductor ${\mathrm{Bi
instead of
Experimental Detection of a Majorana Mode in the core of a Magnetic Vortex inside a Topological Insulator-Superconductor ${\mathrm{Bi}}{2}{\mathrm{Te}}{3}/{\mathrm{NbSe}}_{2}$ Heterostructure
Any help would be appreciated.