Re: [R] case insensitive regular expression

From: JeeBee <JeeBee_at_troefpunt.nl>
Date: Mon 05 Jun 2006 - 23:30:00 EST

Found the problem already.
Without the 'with' it works, so I know where to look for the problem now.

Thanks anyways,
JeeBee.

On Mon, 05 Jun 2006 15:16:34 +0200, JeeBee wrote:

> Can anybody fix the following, to match a string
> disregarding case?
>
> I tried:
> with(my.data.frame, regexpr(pattern = '(?i)J\. Test',
> text=TARGET_COLUMN), perl=T) != -1)
>
> R yields: invalid regular expression
>
> with(my.data.frame, regexpr(pattern = 'J\. Test',
> text=TARGET_COLUMN), perl=T) != -1)
> works, but it does not match "J. TEST".
> It does match "J. Test" correctly.
>
> I have the feeling I'm not reading the documentation
> good enough, but cannot seem to figure this out, sorry.
>
> Thanks in advance,
> JeeBee.



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Mon Jun 05 23:38:48 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 06 Jun 2006 - 02:10:30 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.