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

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -