trinker / qdapRegex

qdapRegex is a collection of regular expression tools associated with the qdap package that may be useful outside of the context of discourse analysis.
50 stars 4 forks source link

rm_citation regex doesn't account for page number in citation #5

Closed trinker closed 9 years ago

trinker commented 9 years ago
rm_citation(" intrinsically wrong (Walker, 2008, p. 34).", extract=TRUE)[[1]]
## [1] "Walker, 2008, "
trinker commented 9 years ago

Also needs to considered the use of e.g., cf., and viz.,

trinker commented 9 years ago

Maybe...

(((?<=((\\(((e\\.g\\.)|(cf\\.)|(viz\\.)((,\\s*)|(\\s+)))*)|(;\\s)))

trinker commented 9 years ago

Added handling for viz, cf, eg in: https://github.com/trinker/qdapRegex/commit/997638b97e06cc2dbf18d38528410d4d3e876d0f