Re: [R] Need some help with regular expression

2016-12-15 Thread David Winsemius
older. > > Thanks, > Steven > > > From: Steven Nagy [mailto:nst...@gmail.com] > Sent: Monday, December 12, 2016 10:50 PM > To: 'Bert Gunter' > Cc: 'R-help' > Subject: RE: [R] Need some help with regular expression > > Hi Bert and all,

Re: [R] Need some help with regular expression

2016-12-15 Thread Jeff Newmiller
der. > >Thanks, >Steven > > >From: Steven Nagy [mailto:nst...@gmail.com] >Sent: Monday, December 12, 2016 10:50 PM >To: 'Bert Gunter' >Cc: 'R-help' >Subject: RE: [R] Need some help with regular expression > >Hi Bert and all, > >Sorry I was

Re: [R] Need some help with regular expression

2016-12-15 Thread Steven Nagy
nt: Monday, December 12, 2016 10:50 PM To: 'Bert Gunter' Cc: 'R-help' Subject: RE: [R] Need some help with regular expression Hi Bert and all, Sorry I was too busy at work and didn't have much time to continue this until now. So I studied "?regexp" and I ca

Re: [R] Need some help with regular expression

2016-11-20 Thread Bert Gunter
brackets? > Is ":alnum:" specific to R? I don't think "regexr.com" understands that. Or > maybe that site is for regular expressions in Javascript, and the syntax is > different in R? > > Thank you, > Steven > > -----Original Message----- > From: Ber

Re: [R] Need some help with regular expression

2016-11-20 Thread Steven Nagy
c to R? I don't think "regexr.com" understands that. Or maybe that site is for regular expressions in Javascript, and the syntax is different in R? Thank you, Steven -Original Message- From: Bert Gunter [mailto:bgunter.4...@gmail.com] Sent: Sunday, November 20, 2016

Re: [R] Need some help with regular expression

2016-11-20 Thread Bert Gunter
If I understand you correctly, I think you are making it more complex than necessary. Using your example (thanks!!), the following should get you started: > x<- c("Name.MEMBER_TYPE: NMA -> STU ; CATEGORY: -> 1 ; CITY: MISSISSAUGA -> > Mississauga ; ZIP: L5N1H9 -> L5N 1H9 ; COUNTRY: CAN -> ; ME

[R] Need some help with regular expression

2016-11-20 Thread Steven Nagy
I tried out a regular expression on this website: http://regexr.com/3en1m So the input text is: "Name.MEMBER_TYPE: -> STU" The regular expression is: ((?:\w+|\s) -> STU|STU -> (?:\w+|\s)) And it returns: " -> STU" but when I use in R, it doesn't return the same result: strapply(c