Hi Mark, stock<-"/opt/limsrv/mark/research/equity/projects/testDL/stock_data/fhdb/US/BLC.NYSE" > gsub(".*/([^/]+)$", "\\1",stock) [1] "BLC.NYSE"
--- On Tue, 23/9/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > From: [EMAIL PROTECTED] <[EMAIL PROTECTED]> > Subject: [R] perl expression question > To: r-help@r-project.org > Received: Tuesday, 23 September, 2008, 10:29 AM > If I have the string below. does someone know a regular > expression to > just get the "BLC.NYSE". I bought the > O'Reilley > book and read it when I can and I study the solutions on > the list but > I'm still not self sufficient with these things. > Thanks. > > > stock<-"/opt/limsrv/mark/research/equity/projects/testDL/stock_data/fhdb/US/BLC.NYSE" > > ______________________________________________ > 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. ______________________________________________ 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.