> sub("I\\((.*?)\\)", "\\1", t1) # nongreedy
[1] "(Ithis) test"


On Thu, Jun 14, 2012 at 7:03 AM, nalluri pratap <pratap_s...@yahoo.co.in> wrote:
>
> Hi,
>
> I have a string t1="(Ithis) I(test)". I need to get t2="(Ithis) test".
>
> Can someone look into this. ?I have tried using gsub("I[^)]","",t1) , but 
> didn't get the required result.
>
> Thanks,
> Pratap
>        [[alternative HTML version deleted]]
>
>



-- 
Sarah Goslee
http://www.functionaldiversity.org

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to