I'm trying to create a regular expression to remove everything that is not part of the business name in a string, but I'm having trouble not removing the symbols that are in the middle of it.
Entry:
201700000000111 01/02/2017 11.111.111/0001-74 ADAMA BRASIL S/A ATIVA 0,00 160,00 160,00 0,00 0,00 0,00 0,00 0,00
201700000000122 01/02/2017 22.222.222/0002-75 AGRITEX COMERCIAL AGRÍCOLA LTDA (QUERÊNCIA) ATIVA 2,79 170,00 170,00 0,00 0,00 0,00 4,74 0,00
201700000000133 07/02/2017 33.333.333/0001-76 CREMONESE WANDSCHEER & CIA LTDA - ME ATIVA 0,00 50,00 50,00 0,00 0,00 0,00 0,00 0,00
201700000000144 23/02/2017 44.444.444/0001-77 G3 SEMENTES LTDA ATIVA 0,00 230,00 230,00 0,00 0,00 0,00 0,00 0,00
Output required:
ADAMA BRASIL S/A ATIVA
AGRITEX COMERCIAL AGRÍCOLA LTDA (QUERÊNCIA) ATIVA
CREMONESE WANDSCHEER & CIA LTDA - ME ATIVA
Currently I have created one as follows, but it is not getting as I need it. I am using java, but can post in other ways that I add the code.
s.replaceAll("[^A-zÀ-ú\s]", "").trim();