I have a string, which is arranged in a string without spaces and some characters and without punctuation. In final string is 6 characters "ABCDEF" but length is 7. Why? It is in ORACLE.
select
regexp_replace((upper(utl_raw.cast_to_varchar2((nlssort(trim('a.Bc d-E/f'), 'nls_sort=binary_ai'))))), '[/:.,- ]|\d', '') as column_1
,length(regexp_replace((upper(utl_raw.cast_to_varchar2((nlssort(trim('a.Bc d-E/f'), 'nls_sort=binary_ai'))))), '[/:.,- ]|\d', '')) as length_1
from dual
Thanks
Looks like utl_raw.cast_to_varchar2() adds the null terminator to the string which LENGTH() counts: