Closed moodymudskipper closed 5 years ago
done :
library(unglue)
sentences <- c("666 is [a number]", "foo is [a word]",
"42 is [the answer]", "Area 51 is [unmatched]")
patterns <- c("<number=\\d+> is [<what>]", "<word=\\D+> is [<what>]")
unglue_data(sentences, patterns,open = "<", close = ">")
#> number what word
#> 1 666 a number <NA>
#> 2 NA a word foo
#> 3 42 the answer <NA>
#> 11 NA <NA> <NA>
Created on 2019-07-15 by the reprex package (v0.3.0)
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.
now
"{"
and"}"
are hardcoded in some places