search for: abcd_ef

Displaying 2 results from an estimated 2 matches for "abcd_ef".

Did you mean: abc_def
2018 May 05
1
Discovering patterns in textual strings
...rface than using R's raw regex functionality. Or maybe someone else can suggest a better approach (which is another reason why you should reply to the list, not just me). z <- c("abc", "abc_def", "abc.def", "abc def", "abcd_ef", "abcd", "e","f") pats <- unique(sub("^(.+)[. _]+.*", "\\1", z)) ## gives: > pats [1] "abc" "abcd" "e" "f" This gives you the four separate patterns that you could then use to...
2018 May 07
0
Discovering patterns in textual strings
...rface than using R's raw regex functionality. Or maybe someone else can suggest a better approach (which is another reason why you should reply to the list, not just me). z <- c("abc", "abc_def", "abc.def", "abc def", "abcd_ef", "abcd", "e","f") pats <- unique(sub("^(.+)[. _]+.*", "\\1 <file://1> ", z)) ## gives: > pats [1] "abc" "abcd" "e" "f" This gives you the four separate patterns that...