chara <- ".a.b.c (good) .e.f.g (bad) "
str_replace_all(chara,".","_")
str_extract(chara,"(.*)")
I want to get the characters in "()" and the characters after "." and put each of them in col_1, col_2, ... col_8.
like this
tibble(col_1 = "a",col_2="b",....col_8="bad")
When I look into it, I find that . and () have a special meaning in pattern because they are used to search for characters.
Is there any way to replace them like in janitor::clean_names()?
Or how can I specify it in pattern?
thank you