Examine to remove numeric characters

I have value ‘01025580029024097’ and i like to do the following:

  1. Remove the 7th and 17th (last) characters
  2. Add ‘-’ separator in 6,4,3,2 position

01025580029024097

End results should be ‘010255-0029-024-09

I’ve tried :

#TEXT := '01025580029024097'
#POS  := 7
#LENG := 1
EXAMINE SUBSTRING(#TEXT,#POS,#LENG) FOR '?' AND DELETE

it did not work

What about

compress

  substring(#text,1,6)
  '-'
  substring(#text,8,4)
  '-'
  substring(#text,12,3)
  '-'
  substring(#text,15,2)

to #text leaving no
1 Like

or

compress

   substring(#text,1,6)
   substring(#text,8,4)
   substring(#text,12,3)
   substring(#text,15,2)

to #text with delimiter '-'
1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.