How do you assign E.R to separate the name of the city?
cid <- c(cidade1..SP.Brasil,cidade2...SP.Brasil,cidade3..SPDF.Brasil,cidade4...SPDF.Brasil)
In the sublime, for example, this works:
\.{3}[A-Z]{4}|\.{3}[A-Z]{2}|\.{2}[A-Z]{4}|\.{2}[A-Z]{2}
But I can not assign a variable in rstudio.
pattern <- ".{3}[A-Z]{4}|.{3}[A-Z]{2}|.{2}[A-Z]{4}|.{2}[A-Z]{2}"
pattern <- "\.{3}[A-Z]{4}|\.{3}[A-Z]{2}|\.{2}[A-Z]{4}|\.{2}[A-Z]{2}"
pattern <- "\.{3}[A-Z]{4}|\.{3}[A-Z]{2}|\.{2}[A-Z]{4}|\.{2}[A-Z]{2}"
pattern <- regex(".{3}[A-Z]{4}|.{3}[A-Z]{2}|.{2}[A-Z]{4}|.{2}[A-Z]{2}")
pattern <- regex("\.{3}[A-Z]{4}|\.{3}[A-Z]{2}|\.{2}[A-Z]{4}|\.{2}[A-Z]{2}")
pattern <- regex("\.{3}[A-Z]{4}|\.{3}[A-Z]{2}|\.{2}[A-Z]{4}|\.{2}[A-Z]{2}")
c <- strsplit(cid, pattern, fixed = TRUE)