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,
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
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
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
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
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
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
7 matches
Mail list logo