Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 206278

extract a text string after spaces and a symbol with gsub R

$
0
0

I need to extract the first word (German) from the following text string

substr(details[1],0,50)%>%
+     gsub("[^a-z/A-Z/,/ ]","" ,.)%>%  
+     gsub("A-Z.*" , "", .)
[1] "  , German, European, Central European"

For many combinations I try with gsub I can't extract it

Thank you very much


Viewing all articles
Browse latest Browse all 206278

Trending Articles