REGEXP_SUBSTR to cut/ get a string of another field

Query

I have the following field in entityid:

ensar akdere(64ca6ddcbedba60011a43a96)

I want to pull just 64ca6ddcbedba60011a43a96 from that string.

I have this formula:

REGEXP_SUBSTR({entityid},'[^(]+$’) which pulls that plus the last ) character, how can I get it to pull just 24 characters AFTER the first Paren?

Answer.

I was able to test this on my account and here are the formulas I came up with:

  • REPLACE(REGEXP_SUBSTR({entityid},'[^(]+$’),’)’,”)
  • SUBSTR({entityid}, INSTR({entityid}, ‘(‘) + 1, 24)

Leave a comment

Your email address will not be published. Required fields are marked *