I'm trying to use split function to cut the text below in a way that only the title and the booktitle sections are returned. For example a sample text is like this
@inproceedings{DBLP:conf/crowncom/Chatzikokolakis15,
author = {Konstantinos Chatzikokolakis and
Alexandros Kaloxylos and
Panagiotis Spapis and
Nancy Alonistioti and
Chan Zhou and
Josef Eichinger and
{\"{O}}mer Bulakci},
title = {On the Way to Massive Access in 5G: Challenges and Solutions for Massive
Machine Communications - (Invited Paper)},
booktitle = {Cognitive Radio Oriented Wireless Networks - 10th International Conference,
{CROWNCOM} 2015, Doha, Qatar, April 21-23, 2015, Revised Selected
Papers},
pages = {708--717},
year = {2015},
crossref = {DBLP:conf/crowncom/2015},
url = {http://dx.doi.org/10.1007/978-3-319-24540-9_58},
doi = {10.1007/978-3-319-24540-9_58},
timestamp = {Wed, 14 Oct 2015 08:42:42 +0200},
biburl = {http://dblp.uni-trier.de/rec/bib/conf/crowncom/Chatzikokolakis15},
bibsource = {dblp computer science bibliography, http://dblp.org}
}
and I want as an exit these 2 blocks as separate strings:
booktitle = {Cognitive Radio Oriented Wireless Networks - 10th International Conference,
{CROWNCOM} 2015, Doha, Qatar, April 21-23, 2015, Revised Selected
Papers}
title = {On the Way to Massive Access in 5G: Challenges and Solutions for Massive
Machine Communications - (Invited Paper)}
Can anyone please help me with the regular expression that applies in Java and especially in the split method?
split? It would require from you to describe everything you don't want. Maybe focus on things you would like to find instead and usePattern/Matchercombination.{and}we can focus on number of spaces at start of each line to separating each sections. Rest is simply checking first word in section (titleorbooktitle). But since I really don't like to correct problems which could be avoided by having more informations about format used in text I will wait until OP confirmations that we can actually rely on number of spaces.