How can I use a JMESPath query to filter a property Name
which starts with abc
, and ends with a timestamp in the format YYYYMMDD-HH
, for example: abc-20230913-11
.
I know how to filter a string using starts_with
and ends_with
, but I am not sure how to filter a string that ends with a timestamp format YYYYMMDD-HH
.
--query 'Clusters[?
starts_with(Name, `abc`) == `true`
&& ends_with(Name, ???)
].[Name]'