Hi Bogaso,
I see your ultimate goal is to extract the Date-time part from your
expression, then below should help :
> as.POSIXlt(gsub("[^0-9a-zA-Z]", "", "\":\"03-JAN-2018 16:00:00\""),
format = "%d%b%Y%H%M%OS")
[1] "2018-01-03 16:00:00 GMT"
_
Hello,
I believe the following regex will do it.
x <- "\":\"03-JAN-2018 16:00:00\""
sub('^.*(\\d{2}-\\w{3}-\\d{4} \\d{2}:\\d{2}:\\d{2})[:"]', '\\1', x)
Hope this helps,
Rui Barradas
On 1/3/2018 2:26 PM, Christofer Bogaso wrote:
Hi,
I was working on following expression :
"\":\"03-JAN-201
On Wed, Jan 03, 2018 at 07:56:27PM +0530, Christofer Bogaso wrote:
> Hi,
>
> I was working on following expression :
>
> "\":\"03-JAN-2018 16:00:00\""
>
>
> This is basically a combination of Date and Time mixed with some Noise.
>
> I want to extract only Date and Time part i.e. "03-JAN-2018 1
Hi,
I was working on following expression :
"\":\"03-JAN-2018 16:00:00\""
This is basically a combination of Date and Time mixed with some Noise.
I want to extract only Date and Time part i.e. "03-JAN-2018 16:00:00
I tried following :
gsub("![0-9][0-9]-[a-zA-Z][a-zA-Z][a-zA-Z]-[0-9][0-9][0-9
4 matches
Mail list logo