say I have
job.batch/monitoring-cloud12390200
or
service/monitoring-opentt-collector
I want to match job
in the first and service
in the second.
I know I can use positive lookahead to match the string up to and if it has a /
by using .*((?=\/))
But this will give me job.batch
in the first
What I want to do is match the string up to the first /
or .
, whichever comes first.