Yes, you are right. Thank you.
2015-10-08 20:07 GMT-05:00 David Winsemius :
>
> On Oct 8, 2015, at 4:50 PM, Omar André Gonzáles Díaz wrote:
>
> > David, it does work but not in all cases:
>
> It should work if you change the "+" to "*" in the last capture class. It
> makes trailing non-digit cha
On Oct 8, 2015, at 4:50 PM, Omar André Gonzáles Díaz wrote:
> David, it does work but not in all cases:
It should work if you change the "+" to "*" in the last capture class. It
makes trailing non-digit characters entirely optional.
> sub("(^.+ )(\\d+)([\"]|[']{2})(.*$)", "\\2\\3", b)
[1] "4
On Oct 8, 2015, at 3:45 PM, Omar André Gonzáles Díaz wrote:
> Hi I have a vector of 100 elementos like this ones:
>
> a <- c("SMART TV LCD FHD 70\" LC70LE660", "LED FULL HD 58'' LE58D3140")
>
> I want to put just the (70\") and (58'') in a vector b.
> sub("(^.+ )(\\d+)([\"]|[']{2})(.+$)", "\\2
On Thu, Oct 08, 2015 at 05:45:13PM -0500, Omar André Gonzáles Díaz wrote:
> Hi I have a vector of 100 elementos like this ones:
>
> a <- c("SMART TV LCD FHD 70\" LC70LE660", "LED FULL HD 58'' LE58D3140")
>
> I want to put just the (70\") and (58'') in a vector b.
>
> This is my try, but is not w
Hi I have a vector of 100 elementos like this ones:
a <- c("SMART TV LCD FHD 70\" LC70LE660", "LED FULL HD 58'' LE58D3140")
I want to put just the (70\") and (58'') in a vector b.
This is my try, but is not working:
b <- grepl('^[0-9]{2}""$',a)
Any hint is welcome, thanks.
[[alternati
5 matches
Mail list logo