Hi
Is there a way to replace the last digit with a hyphen and a digit.
original needs to be replaced with
file01 file01-01
file02 file02-02
With AmarGhosh I solved this
with names as
(
select '/file01/some/file01' name from dual
union all
select '/file02/another/file02' name from dual
)
select name,regexp_replace(name, '^/file0([1-9]+)','/file0\1-\1') new
NAME NEW
------------------------- -------------------------
/file01/some/file01 /file01-1/some/file01
/file02/another/file02 /file02-2/another/file02
Thanks Thanks