[R] regexp inside and outside brackets
dusa.adrian at unibuc.ro
Fri Dec 11 14:50:28 CET 2015
For the regexp aficionados, out there:
I need a regular expression to extract either everything within some
brackets, or everything outside the brackets, in a string.
This would be the test string:
Everything outside the brackets would be:
"A1 ~B0 CO NN"
and everything inside the brackets would be:
"0 1 a2 12"
I have a working solution involving strsplit(), but I wonder if there is a
more direct way.
Thanks in advance for any hint,
University of Bucharest
Romanian Social Data Archive
Soseaua Panduri nr.90
050663 Bucharest sector 5
[[alternative HTML version deleted]]
More information about the R-help