I have a problem when downloading and extracting tables from a pdf. Currently, I am at the phase of extracting the "contents" table which I will use as index for the rest of the document. My problem is that there are three columns in the table formatted as one string, some have one space between the first and second column and some hace two or more. Which regex pattern should I use?
As an example:
a <- "15 Aguascalientes - Ent. Cd. de Los Niños AGS"
b <- "3 Aguascalientes - Zacatecas MEX-045"
str_split_fixed(a, "\\s{2,}", n = 3)
str_split_fixed(b, "\\s{2,}", n = 3)
The output I want is like the one for "b"
