I can use \=expr in :s command. For example, to convert timestamps format inplace:
:%s/\v<\d{10}>/\=strftime('%c', submatch(0))/g
But the functionality of built-in functions are so limited. To parse a timestamp, I'd like to use python script like this:
$ python
>>> import datetime
>>> d = 'Apr 11 2012'
>>> datetime.datetime.strptime(d, '%b %d %Y').isoformat()
'2012-04-11T00:00:00'
How to embed this py-expr into :s command?
:%s/\v\w+ \d{2} \d{4}/\={?py-expr?}/g
Thanks!