Skip to content
Prev 172367 / 398506 Next

regular expression question

Here are two solutions using gsubfn package.
strapply works by matching the what you want
rather than what you don't want which may make
it easier in this case.  The two solutions are the
same except we use \\ escapes in the first and
[ ... ] in the second, i.e. \\( has the same effect
as [(].   In each case we first match the ( then
a sequence of characters that is not ] and finally
we match the terminating ].
[1] "(-0.791,-0.263]" "(-38,-1.24]"     "(0.96,2.43]"
[1] "(-0.791,-0.263]" "(-38,-1.24]"     "(0.96,2.43]"
On Tue, Mar 3, 2009 at 1:16 AM, <markleeds at verizon.net> wrote: