[R] Help with Regular expression

Arun Kumar Saha arun.kumar.saha at gmail.com
Fri Jan 5 21:46:12 CET 2018


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"
_____________________________________________________

Arun Kumar Saha, FRM
QUANTITATIVE RISK AND HEDGE CONSULTING SPECIALIST
 LinkedIn: http://in.linkedin.com/in/ArunFRM
 Personal : http://WWW.ARUNSAHA.IN  <http://WWW.ARUNSAHA.IN>
_____________________________________________________

	[[alternative HTML version deleted]]



More information about the R-help mailing list