Regex - how to get time and date and get ISO8601 timestamp -


i have text

2014-01-30 10:15 text here 2014-01-30 10:20 other text here 

i need regex matches timestamp group in iso 8601 format.

required output:

2014-01-30t10:15z 2014-01-30t10:20z 

with regex can't want, replace space 't' , append 'z @ end.

^(?<timestamp>\s+ \s+) 

does know how solve problem?

--- update ---

btw, i'm using http://rubular.com/ test regex

you perhaps modify current regex bit to:

^(\s+) (\s+).* 

and replace $1t$2z

regex101 demo


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -