I have a string, which contains dates in yyyy-MM-dd
format along with other symbols.
Some of these dates contains the 'Z'
symbol at the end.
For example:
control1970-04-26Z_shifted1982-02-01_Zulu1999-09-09Z
I need to eliminate these 'Z' symbols in the string and I guess regex would be a nice solution.
I've tried the following regex:
\d{4}-\d{2}-\d{2}Z{1}
But it matches the whole date, include 'Z'
character.
Is there any way to match only 'Z'
character and eliminate it using replaceAll
method?